PM / Runtime: Handle .runtime_suspend() failure correctly
authorMing Lei <ming.lei@canonical.com>
Wed, 12 Oct 2011 20:59:33 +0000 (22:59 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 16 Oct 2011 21:25:23 +0000 (23:25 +0200)
commit857b36c7b038ac56a882ee914df93e5985443074
tree04af09cacf24cde80659c810c66bc89c6fcf84c9
parent47d8f0bac0fda4c15a030f92cd6da6c6bed87459
PM / Runtime: Handle .runtime_suspend() failure correctly

If .runtime_suspend() returns -EAGAIN or -EBUSY, the device should
still be in ACTIVE state, so it is not necessary to send an idle
notification to its parent.  If .runtime_suspend() returns other
fatal failure, it doesn't make sense to send idle notification to
its parent.

Skip parent idle notification when failure is returned from
.runtime_suspend() and update comments in rpm_suspend() to reflect
that change.

[rjw: Modified the subject and changelog slightly.]

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/runtime.c