Skip to content

Commit 075c3c4

Browse files
committed
Merge back cpufreq changes for v5.18.
2 parents c5eb92f + 7ddf5e3 commit 075c3c4

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/cpufreq/cpufreq_governor_attr_set.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
#include "cpufreq_governor.h"
1010

11-
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
12-
{
13-
return container_of(kobj, struct gov_attr_set, kobj);
14-
}
15-
1611
static inline struct governor_attr *to_gov_attr(struct attribute *attr)
1712
{
1813
return container_of(attr, struct governor_attr, attr);

drivers/cpufreq/longhaul.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
668668
u32 nesting_level,
669669
void *context, void **return_value)
670670
{
671-
struct acpi_device *d;
671+
struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle);
672672

673-
if (acpi_bus_get_device(obj_handle, &d))
673+
if (!d)
674674
return 0;
675675

676676
*return_value = acpi_driver_data(d);

include/linux/cpufreq.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ struct gov_attr_set {
661661
/* sysfs ops for cpufreq governors */
662662
extern const struct sysfs_ops governor_sysfs_ops;
663663

664+
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
665+
{
666+
return container_of(kobj, struct gov_attr_set, kobj);
667+
}
668+
664669
void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node);
665670
void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node);
666671
unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node);

kernel/sched/cpufreq_schedutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov);
539539

540540
static void sugov_tunables_free(struct kobject *kobj)
541541
{
542-
struct gov_attr_set *attr_set = container_of(kobj, struct gov_attr_set, kobj);
542+
struct gov_attr_set *attr_set = to_gov_attr_set(kobj);
543543

544544
kfree(to_sugov_tunables(attr_set));
545545
}

0 commit comments

Comments
 (0)