summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/suspend.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-06-13 15:53:34 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 16:09:01 -0700
commit9cddad77574313fcee36c5e60122718daa7c0361 (patch)
tree2d6dd05e02ffff565ffb23046933f33cda0531e8 /drivers/base/power/suspend.c
parent11048dcf333c414f237bb713c422e68f67b115a3 (diff)
PM: Remove pm_parent from struct dev_pm_info
The pm_parent member of struct dev_pm_info (defined in include/linux/pm.h) is only used to check if the device's parent is in the right state while the device is being suspended or resumed. However, this can be done just as well with the help of the parent pointer in struct device, so pm_parent can be removed along with some code that handles it. 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, 3 insertions, 4 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index 9d6701cd7f1..19fae88de7b 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -55,13 +55,12 @@ 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->power.pm_parent
- && dev->power.pm_parent->power.power_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->power.pm_parent->bus_id,
- dev->power.pm_parent->power.power_state.event);
+ dev->parent->bus_id,
+ dev->parent->power.power_state.event);
}
dev->power.prev_state = dev->power.power_state;