diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
commit | 220d0b1dbf78c6417a658c96e571415552d3abac (patch) | |
tree | 70cd3862540c38ea490e7a27c3c7acc35b680234 /drivers/base/power/runtime.c | |
parent | 474b18ccc264c472abeec50f48469b6477202699 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge branch 'master' into for-2.6.33
Diffstat (limited to 'drivers/base/power/runtime.c')
-rw-r--r-- | drivers/base/power/runtime.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 38556f6cc22d..846d89e3d122 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -51,8 +51,6 @@ static int __pm_runtime_idle(struct device *dev) | |||
51 | { | 51 | { |
52 | int retval = 0; | 52 | int retval = 0; |
53 | 53 | ||
54 | dev_dbg(dev, "__pm_runtime_idle()!\n"); | ||
55 | |||
56 | if (dev->power.runtime_error) | 54 | if (dev->power.runtime_error) |
57 | retval = -EINVAL; | 55 | retval = -EINVAL; |
58 | else if (dev->power.idle_notification) | 56 | else if (dev->power.idle_notification) |
@@ -93,8 +91,6 @@ static int __pm_runtime_idle(struct device *dev) | |||
93 | wake_up_all(&dev->power.wait_queue); | 91 | wake_up_all(&dev->power.wait_queue); |
94 | 92 | ||
95 | out: | 93 | out: |
96 | dev_dbg(dev, "__pm_runtime_idle() returns %d!\n", retval); | ||
97 | |||
98 | return retval; | 94 | return retval; |
99 | } | 95 | } |
100 | 96 | ||
@@ -332,11 +328,11 @@ int __pm_runtime_resume(struct device *dev, bool from_wq) | |||
332 | * necessary. | 328 | * necessary. |
333 | */ | 329 | */ |
334 | parent = dev->parent; | 330 | parent = dev->parent; |
335 | spin_unlock_irq(&dev->power.lock); | 331 | spin_unlock(&dev->power.lock); |
336 | 332 | ||
337 | pm_runtime_get_noresume(parent); | 333 | pm_runtime_get_noresume(parent); |
338 | 334 | ||
339 | spin_lock_irq(&parent->power.lock); | 335 | spin_lock(&parent->power.lock); |
340 | /* | 336 | /* |
341 | * We can resume if the parent's run-time PM is disabled or it | 337 | * We can resume if the parent's run-time PM is disabled or it |
342 | * is set to ignore children. | 338 | * is set to ignore children. |
@@ -347,9 +343,9 @@ int __pm_runtime_resume(struct device *dev, bool from_wq) | |||
347 | if (parent->power.runtime_status != RPM_ACTIVE) | 343 | if (parent->power.runtime_status != RPM_ACTIVE) |
348 | retval = -EBUSY; | 344 | retval = -EBUSY; |
349 | } | 345 | } |
350 | spin_unlock_irq(&parent->power.lock); | 346 | spin_unlock(&parent->power.lock); |
351 | 347 | ||
352 | spin_lock_irq(&dev->power.lock); | 348 | spin_lock(&dev->power.lock); |
353 | if (retval) | 349 | if (retval) |
354 | goto out; | 350 | goto out; |
355 | goto repeat; | 351 | goto repeat; |
@@ -781,7 +777,7 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status) | |||
781 | } | 777 | } |
782 | 778 | ||
783 | if (parent) { | 779 | if (parent) { |
784 | spin_lock_irq(&parent->power.lock); | 780 | spin_lock(&parent->power.lock); |
785 | 781 | ||
786 | /* | 782 | /* |
787 | * It is invalid to put an active child under a parent that is | 783 | * It is invalid to put an active child under a parent that is |
@@ -797,7 +793,7 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status) | |||
797 | atomic_inc(&parent->power.child_count); | 793 | atomic_inc(&parent->power.child_count); |
798 | } | 794 | } |
799 | 795 | ||
800 | spin_unlock_irq(&parent->power.lock); | 796 | spin_unlock(&parent->power.lock); |
801 | 797 | ||
802 | if (error) | 798 | if (error) |
803 | goto out; | 799 | goto out; |