Commit 075c3c48 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge back cpufreq changes for v5.18.

parents c5eb92f5 7ddf5e37
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
#include "cpufreq_governor.h" #include "cpufreq_governor.h"
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
{
return container_of(kobj, struct gov_attr_set, kobj);
}
static inline struct governor_attr *to_gov_attr(struct attribute *attr) static inline struct governor_attr *to_gov_attr(struct attribute *attr)
{ {
return container_of(attr, struct governor_attr, attr); return container_of(attr, struct governor_attr, attr);
......
...@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle, ...@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
u32 nesting_level, u32 nesting_level,
void *context, void **return_value) void *context, void **return_value)
{ {
struct acpi_device *d; struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle);
if (acpi_bus_get_device(obj_handle, &d)) if (!d)
return 0; return 0;
*return_value = acpi_driver_data(d); *return_value = acpi_driver_data(d);
......
...@@ -661,6 +661,11 @@ struct gov_attr_set { ...@@ -661,6 +661,11 @@ struct gov_attr_set {
/* sysfs ops for cpufreq governors */ /* sysfs ops for cpufreq governors */
extern const struct sysfs_ops governor_sysfs_ops; extern const struct sysfs_ops governor_sysfs_ops;
static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj)
{
return container_of(kobj, struct gov_attr_set, kobj);
}
void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node); void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node);
void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node); void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node);
unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node); unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node);
......
...@@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov); ...@@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov);
static void sugov_tunables_free(struct kobject *kobj) static void sugov_tunables_free(struct kobject *kobj)
{ {
struct gov_attr_set *attr_set = container_of(kobj, struct gov_attr_set, kobj); struct gov_attr_set *attr_set = to_gov_attr_set(kobj);
kfree(to_sugov_tunables(attr_set)); kfree(to_sugov_tunables(attr_set));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment