Skip to contentSkip to conversation

cpufreq: fix typo when cpufreq device remove

PATCH NAK Schspa Shi 2 participants 2 messages May 6, 2022 – May 9, 2022 CPU frequency scaling framework

lore
Share & tools
lore

Schspa Shi

author
#0 lore raw

PATCH 1/1 cpufreq: fix typo when cpufreq device remove

This should check cpufreq_driver->exit pointer before call this function

Fixes 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of

CPUs")

---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
index 43dfaa8124e2..0f59c8ec2b39 100644
@@ -1661,7 +1661,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
 
 	if (cpumask_empty(policy->real_cpus)) {
 		/* We did light-weight exit earlier, do full tear down now */
-		if (cpufreq_driver->offline)
+		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(policy);
 
 		cpufreq_policy_free(policy);
Signature · 1 line
2.24.3 (Apple Git-128)
maintainer NAK
#1 lore raw
Quoted 15 lines · Schspa Shi

This should check cpufreq_driver->exit pointer before call this function

Fixes 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of

CPUs")

---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +0 -0
index 43dfaa8124e2..0f59c8ec2b39 100644

drivers/cpufreq/cpufreq.c static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) · line 1667

Quoted 8 lines
drivers/cpufreq/cpufreq.c +1 -1
@@ -1661,7 +1661,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
 
 	if (cpumask_empty(policy->real_cpus)) {
 		/* We did light-weight exit earlier, do full tear down now */
-		if (cpufreq_driver->offline)
+		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(policy);
 
 		cpufreq_policy_free(policy);

NAK.

The code is doing fine and there is a comment above it on why it is doing it this way.

Signature · 1 line
viresh