summaryrefslogtreecommitdiff
path: root/drivers/base/power/suspend.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-06-17 21:50:51 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 03:09:02 +0400
commit43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6 (patch)
tree2759e89c277a3fa9dcb4d5787375356fad29ecc7 /drivers/base/power/suspend.c
parent1c3f7d1c79425dd8f627b8da139fd1855f096b6e (diff)
downloadlinux-43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6.tar.xz
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>
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r--drivers/base/power/suspend.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index a3ff3944832a..26df9b231737 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -63,13 +63,6 @@ int suspend_device(struct device * dev, pm_message_t state)
dev_dbg(dev, "PM: suspend %d-->%d\n",
dev->power.power_state.event, state.event);
}
- if (dev->parent && dev->parent->power.power_state.event) {
- dev_err(dev,
- "PM: suspend %d->%d, parent %s already %d\n",
- dev->power.power_state.event, state.event,
- dev->parent->bus_id,
- dev->parent->power.power_state.event);
- }
if (dev->class && dev->class->suspend) {
suspend_device_dbg(dev, state, "class ");