Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=784a6e1cc406b7ef48476a1f38b83fc551f5616f
Commit:     784a6e1cc406b7ef48476a1f38b83fc551f5616f
Parent:     f6ace2c99afefb7969ccccba2fb413ad29ab2e2e
Author:     Alan Stern <[EMAIL PROTECTED]>
AuthorDate: Fri May 4 11:49:57 2007 -0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 16:29:46 2007 -0700

    USB: interface PM state
    
    This patch (as880) strives to keep the PM core's idea of a USB
    interface's power state in synch with usbcore's own idea.  In the end
    this doesn't really matter, but it's better to be consistent.
    
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/core/driver.c |    4 ----
 drivers/usb/core/usb.h    |    2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 2619986..38c3dd2 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -879,8 +879,6 @@ static int usb_suspend_interface(struct usb_interface 
*intf, pm_message_t msg)
 
 done:
        // dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
-       if (status == 0)
-               intf->dev.power.power_state.event = msg.event;
        return status;
 }
 
@@ -920,8 +918,6 @@ static int usb_resume_interface(struct usb_interface *intf)
 
 done:
        // dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
-       if (status == 0)
-               intf->dev.power.power_state.event = PM_EVENT_ON;
        return status;
 }
 
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index bf2eb0d..6f361df 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -100,11 +100,13 @@ static inline int is_usb_device_driver(struct 
device_driver *drv)
 static inline void mark_active(struct usb_interface *f)
 {
        f->is_active = 1;
+       f->dev.power.power_state.event = PM_EVENT_ON;
 }
 
 static inline void mark_quiesced(struct usb_interface *f)
 {
        f->is_active = 0;
+       f->dev.power.power_state.event = PM_EVENT_SUSPEND;
 }
 
 static inline int is_active(const struct usb_interface *f)
-
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