Unified · Split
| @@ -8,11 +8,6 @@ · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | #include "cpufreq_governor.h" |
| 10 | 10 | |
| 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 | − | |
| 16 | 11 | static inline struct governor_attr *to_gov_attr(struct attribute *attr) |
| 17 | 12 | { |
| 18 | 13 | return container_of(attr, struct governor_attr, attr); |
| @@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle, · 667 unmodified lines | ||
| 668 | 668 | u32 nesting_level, |
| 669 | 669 | void *context, void **return_value) |
| 670 | 670 | { |
| 671 | − struct acpi_device *d; | |
| 671 | + struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle); | |
| 672 | 672 | |
| 673 | − if (acpi_bus_get_device(obj_handle, &d)) | |
| 673 | + if (!d) | |
| 674 | 674 | return 0; |
| 675 | 675 | |
| 676 | 676 | *return_value = acpi_driver_data(d); |
| @@ -661,6 +661,11 @@ struct gov_attr_set { · 660 unmodified lines | ||
| 661 | 661 | /* sysfs ops for cpufreq governors */ |
| 662 | 662 | extern const struct sysfs_ops governor_sysfs_ops; |
| 663 | 663 | |
| 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 | + | |
| 664 | 669 | void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node); |
| 665 | 670 | void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node); |
| 666 | 671 | unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node); |
| @@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov); · 538 unmodified lines | ||
| 539 | 539 | |
| 540 | 540 | static void sugov_tunables_free(struct kobject *kobj) |
| 541 | 541 | { |
| 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); | |
| 543 | 543 | |
| 544 | 544 | kfree(to_sugov_tunables(attr_set)); |
| 545 | 545 | } |