Commit 9697ce4c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] cpufreq sysfs oops fix

From: Dominik Brodowski <linux@brodo.de>

Fix an ordering problem whcih was causing cpufreq oopses in sysfs.
parent 86b7683a
......@@ -449,6 +449,9 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
if (!kobject_get(&data->kobj))
return -EFAULT;
if (cpufreq_driver->target)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
kobject_unregister(&data->kobj);
kobject_put(&data->kobj);
......@@ -459,9 +462,6 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
*/
wait_for_completion(&data->kobj_unregister);
if (cpufreq_driver->target)
__cpufreq_governor(data, CPUFREQ_GOV_STOP);
if (cpufreq_driver->exit)
cpufreq_driver->exit(data);
......
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