Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275623
b: refs/heads/master
c: 9f3bdd4
h: refs/heads/master
i:
  275621: 0a532c9
  275619: f052dc3
  275615: c029e98
v: v3
  • Loading branch information
Axel Lin authored and Rafael J. Wysocki committed Nov 14, 2011
1 parent f180ff4 commit 888e64d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: bc9f54498eadc5254378e376e8d2111cfd30b229
refs/heads/master: 9f3bdd4f937a75c4589a867dc1f8fefe09c1a618
8 changes: 6 additions & 2 deletions trunk/drivers/devfreq/devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,14 @@ struct devfreq *devfreq_add_device(struct device *dev,
*/
int devfreq_remove_device(struct devfreq *devfreq)
{
bool central_polling;

if (!devfreq)
return -EINVAL;

if (!devfreq->governor->no_central_polling) {
central_polling = !devfreq->governor->no_central_polling;

if (central_polling) {
mutex_lock(&devfreq_list_lock);
while (wait_remove_device == devfreq) {
mutex_unlock(&devfreq_list_lock);
Expand All @@ -433,7 +437,7 @@ int devfreq_remove_device(struct devfreq *devfreq)
mutex_lock(&devfreq->lock);
_remove_devfreq(devfreq, false); /* it unlocks devfreq->lock */

if (!devfreq->governor->no_central_polling)
if (central_polling)
mutex_unlock(&devfreq_list_lock);

return 0;
Expand Down

0 comments on commit 888e64d

Please sign in to comment.