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

    USB: remove references to dev.power.power_state
    
    This revised patch (as891b) removes two unnecessary references to
    intf->dev.power.power_state from usb-storage, and replaces a reference
    to root_hub->dev.power.power_state with a check of hcd->state.  This
    is in preparation for the removal of dev.power.power_state, which is
    already deprecated.
    
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/core/hcd-pci.c |    3 ++-
 drivers/usb/storage/usb.c  |    2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index edf4300..5cf6d5f 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -207,7 +207,8 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t 
message)
         * We must ignore the FREEZE vs SUSPEND distinction here, because
         * otherwise the swsusp will save (and restore) garbage state.
         */
-       if (hcd->self.root_hub->dev.power.power_state.event == PM_EVENT_ON)
+       if (!(hcd->state == HC_STATE_SUSPENDED ||
+                       hcd->state == HC_STATE_HALT))
                return -EBUSY;
 
        if (hcd->driver->suspend) {
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 8e898e3..df5dc18 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -197,7 +197,6 @@ static int storage_suspend(struct usb_interface *iface, 
pm_message_t message)
        US_DEBUGP("%s\n", __FUNCTION__);
        if (us->suspend_resume_hook)
                (us->suspend_resume_hook)(us, US_SUSPEND);
-       iface->dev.power.power_state.event = message.event;
 
        /* When runtime PM is working, we'll set a flag to indicate
         * whether we should autoresume when a SCSI request arrives. */
@@ -215,7 +214,6 @@ static int storage_resume(struct usb_interface *iface)
        US_DEBUGP("%s\n", __FUNCTION__);
        if (us->suspend_resume_hook)
                (us->suspend_resume_hook)(us, US_RESUME);
-       iface->dev.power.power_state.event = PM_EVENT_ON;
 
        mutex_unlock(&us->dev_mutex);
        return 0;
-
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