Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336733
b: refs/heads/master
c: 4168203
h: refs/heads/master
i:
  336731: 0c127d0
v: v3
  • Loading branch information
Daniel Lezcano authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent eeced1a commit 03ab655
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 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: 42f67f2acab2b7179c0d1ab234869e391448dfa6
refs/heads/master: 41682032715c2c969357c81391a442a24dd1c2c2
10 changes: 1 addition & 9 deletions trunk/drivers/cpuidle/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,9 @@ EXPORT_SYMBOL_GPL(cpuidle_get_driver);
*/
void cpuidle_unregister_driver(struct cpuidle_driver *drv)
{
if (drv != cpuidle_curr_driver) {
WARN(1, "invalid cpuidle_unregister_driver(%s)\n",
drv->name);
return;
}

spin_lock(&cpuidle_driver_lock);

if (!WARN_ON(drv->refcnt > 0))
if (drv == cpuidle_curr_driver && !WARN_ON(drv->refcnt > 0))
cpuidle_curr_driver = NULL;

spin_unlock(&cpuidle_driver_lock);
}
EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
Expand Down

0 comments on commit 03ab655

Please sign in to comment.