PM: fix irq enable/disable in runtime PM code
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 25 Nov 2009 00:06:37 +0000 (01:06 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 29 Nov 2009 15:51:27 +0000 (16:51 +0100)
commit862f89b3d4c6bf3caab7fc69661fc6e725edd00a
tree65d29f636f8c0f488524220b5accea674b5101cf
parenta8a8a669ea13d792296737505adc43ccacf3a648
PM: fix irq enable/disable in runtime PM code

This patch (as1305) fixes a bug in the irq-enable settings and removes
some related overhead in the runtime PM code.

In __pm_runtime_resume(), within the scope of the original
spin_lock_irq(), we know that irqs are disabled.  There's no
reason to go through a pair of enable/disable cycles when
acquiring and releasing the parent's lock.

In __pm_runtime_set_status(), irqs are already disabled when
the parent's lock is acquired, and they must remain disabled
when it is released.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/runtime.c