History

Merge back cpufreq changes for v5.18.

Rafael J. Wysocki committed 4 years ago

Commit 075c3c42 parents c5eb92f 7ddf5e34 files · +8 −8Browse files

Unified · Split

4 files
  1. drivers/cpufreq/cpufreq_governor_attr_set.c +0 −5
  2. drivers/cpufreq/longhaul.c +2 −2
  3. include/linux/cpufreq.h +5 −0
  4. kernel/sched/cpufreq_schedutil.c +1 −1
drivers/cpufreq/cpufreq_governor_attr_set.c+0−5
@@ -8,11 +8,6 @@ · 7 unmodified lines
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+2−2
@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle, · 667 unmodified lines
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+5−0
@@ -661,6 +661,11 @@ struct gov_attr_set { · 660 unmodified lines
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+1−1
@@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov); · 538 unmodified lines
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 }