diff mbox series

[2/3] cpufreq: schedutil: Use to_gov_attr_set() to get the gov_attr_set

Message ID 20220123124508.463305-2-haokexin@gmail.com
State Accepted
Commit 53725c4cbd4567423ff6143c5d10300e53ecf52a
Headers show
Series [1/3] cpufreq: Move to_gov_attr_set() to cpufreq.h | expand

Commit Message

Kevin Hao Jan. 23, 2022, 12:45 p.m. UTC
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>
---
 kernel/sched/cpufreq_schedutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 26778884d9ab..cffcd08f4ec8 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -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));
 }