]> git.baikalelectronics.ru Git - kernel.git/commit
PM: Do not check parent state in suspend and resume core code
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 17 Jun 2007 17:50:51 +0000 (19:50 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:02 +0000 (16:09 -0700)
commit8f8e3317fa93f273105ef83f721dbac05221dc19
tree2759e89c277a3fa9dcb4d5787375356fad29ecc7
parent7fd6f7dcf63be5d608812deac04376e40def2daf
PM: Do not check parent state in suspend and resume core code

The checks if the device's parent is in the right state done in
drivers/base/power/suspend.c and drivers/base/power/resume.c serve no particular
purpose, since if the parent is in a wrong power state, the device's suspend or
resume callbacks are supposed to return an error anyway.  Moreover, they are
also useless from the sanity checking point of view, because they rely on the
code being checked to set dev->parent->power.power_state.event appropriately,
which need not happen if that code is buggy.  For these reasons they can be
removed.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/power/resume.c
drivers/base/power/suspend.c