Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6
Commit:     43a49f8baa6b0e7e5b68ed0ee141e1efacfd9ae6
Parent:     1c3f7d1c79425dd8f627b8da139fd1855f096b6e
Author:     Rafael J. Wysocki <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 17 19:50:51 2007 +0200
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 16:09:02 2007 -0700

    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 <[EMAIL PROTECTED]>
    Acked-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/power/resume.c  |    7 -------
 drivers/base/power/suspend.c |    7 -------
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c
index 0c96106..00fd84a 100644
--- a/drivers/base/power/resume.c
+++ b/drivers/base/power/resume.c
@@ -29,13 +29,6 @@ int resume_device(struct device * dev)
 
        down(&dev->sem);
 
-       if (dev->parent && dev->parent->power.power_state.event) {
-               dev_err(dev, "PM: resume from %d, parent %s still %d\n",
-                       dev->power.power_state.event,
-                       dev->parent->bus_id,
-                       dev->parent->power.power_state.event);
-       }
-
        if (dev->bus && dev->bus->resume) {
                dev_dbg(dev,"resuming\n");
                error = dev->bus->resume(dev);
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index a3ff394..26df9b2 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 ");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to