diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-06-13 09:53:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:01 -0400 |
commit | 9cddad77574313fcee36c5e60122718daa7c0361 (patch) | |
tree | 2d6dd05e02ffff565ffb23046933f33cda0531e8 /drivers/base/power/suspend.c | |
parent | 11048dcf333c414f237bb713c422e68f67b115a3 (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.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 9d6701cd7f10..19fae88de7b3 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) | |||
55 | dev_dbg(dev, "PM: suspend %d-->%d\n", | 55 | dev_dbg(dev, "PM: suspend %d-->%d\n", |
56 | dev->power.power_state.event, state.event); | 56 | dev->power.power_state.event, state.event); |
57 | } | 57 | } |
58 | if (dev->power.pm_parent | 58 | if (dev->parent && dev->parent->power.power_state.event) { |
59 | && dev->power.pm_parent->power.power_state.event) { | ||
60 | dev_err(dev, | 59 | dev_err(dev, |
61 | "PM: suspend %d->%d, parent %s already %d\n", | 60 | "PM: suspend %d->%d, parent %s already %d\n", |
62 | dev->power.power_state.event, state.event, | 61 | dev->power.power_state.event, state.event, |
63 | dev->power.pm_parent->bus_id, | 62 | dev->parent->bus_id, |
64 | dev->power.pm_parent->power.power_state.event); | 63 | dev->parent->power.power_state.event); |
65 | } | 64 | } |
66 | 65 | ||
67 | dev->power.prev_state = dev->power.power_state; | 66 | dev->power.prev_state = dev->power.power_state; |