Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233767
b: refs/heads/master
c: 8f5bc2a
h: refs/heads/master
i:
  233765: 1b14a8e
  233763: b06b980
  233759: 1019768
v: v3
  • Loading branch information
Jiri Slaby authored and Dave Jones committed Mar 1, 2011
1 parent 2fc844a commit b982a1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a536b126f211bdf9a0eecce0d403a26900d2106c
refs/heads/master: 8f5bc2abfd4240b1f55425a3d36b6e6c391bc148
27 changes: 15 additions & 12 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,8 +1919,10 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)

ret = sysdev_driver_register(&cpu_sysdev_class,
&cpufreq_sysdev_driver);
if (ret)
goto err_null_driver;

if ((!ret) && !(cpufreq_driver->flags & CPUFREQ_STICKY)) {
if (!(cpufreq_driver->flags & CPUFREQ_STICKY)) {
int i;
ret = -ENODEV;

Expand All @@ -1935,21 +1937,22 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
if (ret) {
dprintk("no CPU initialized for driver %s\n",
driver_data->name);
sysdev_driver_unregister(&cpu_sysdev_class,
&cpufreq_sysdev_driver);

spin_lock_irqsave(&cpufreq_driver_lock, flags);
cpufreq_driver = NULL;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
goto err_sysdev_unreg;
}
}

if (!ret) {
register_hotcpu_notifier(&cpufreq_cpu_notifier);
dprintk("driver %s up and running\n", driver_data->name);
cpufreq_debug_enable_ratelimit();
}
register_hotcpu_notifier(&cpufreq_cpu_notifier);
dprintk("driver %s up and running\n", driver_data->name);
cpufreq_debug_enable_ratelimit();

return 0;
err_sysdev_unreg:
sysdev_driver_unregister(&cpu_sysdev_class,
&cpufreq_sysdev_driver);
err_null_driver:
spin_lock_irqsave(&cpufreq_driver_lock, flags);
cpufreq_driver = NULL;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
return ret;
}
EXPORT_SYMBOL_GPL(cpufreq_register_driver);
Expand Down

0 comments on commit b982a1d

Please sign in to comment.