cpufreq: schedutil: Use to_gov_attr_set() to get the gov_attr_set
authorKevin Hao <haokexin@gmail.com>
Sun, 23 Jan 2022 12:45:07 +0000 (20:45 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Feb 2022 18:22:34 +0000 (19:22 +0100)
The to_gov_attr_set() has been moved to the cpufreq.h, so use it to get
the gov_attr_set.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/sched/cpufreq_schedutil.c

index 2677888..cffcd08 100644 (file)
@@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov);
 
 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));
 }