diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-05-04 11:54:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:29:46 -0400 |
commit | f3fd77cd2f4499f3e2ef9a1e6d5e4f4349d556c3 (patch) | |
tree | 71cb2e01dfe006c5904ac01d002226b8b6cb04f2 /drivers | |
parent | 8adb4786789c25007f39b4d00dd03cc83bdcb896 (diff) |
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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 3 | ||||
-rw-r--r-- | 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 edf4300a3f7a..5cf6d5f9acbd 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) | |||
207 | * We must ignore the FREEZE vs SUSPEND distinction here, because | 207 | * We must ignore the FREEZE vs SUSPEND distinction here, because |
208 | * otherwise the swsusp will save (and restore) garbage state. | 208 | * otherwise the swsusp will save (and restore) garbage state. |
209 | */ | 209 | */ |
210 | if (hcd->self.root_hub->dev.power.power_state.event == PM_EVENT_ON) | 210 | if (!(hcd->state == HC_STATE_SUSPENDED || |
211 | hcd->state == HC_STATE_HALT)) | ||
211 | return -EBUSY; | 212 | return -EBUSY; |
212 | 213 | ||
213 | if (hcd->driver->suspend) { | 214 | if (hcd->driver->suspend) { |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 8e898e3d861e..df5dc186aef5 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) | |||
197 | US_DEBUGP("%s\n", __FUNCTION__); | 197 | US_DEBUGP("%s\n", __FUNCTION__); |
198 | if (us->suspend_resume_hook) | 198 | if (us->suspend_resume_hook) |
199 | (us->suspend_resume_hook)(us, US_SUSPEND); | 199 | (us->suspend_resume_hook)(us, US_SUSPEND); |
200 | iface->dev.power.power_state.event = message.event; | ||
201 | 200 | ||
202 | /* When runtime PM is working, we'll set a flag to indicate | 201 | /* When runtime PM is working, we'll set a flag to indicate |
203 | * whether we should autoresume when a SCSI request arrives. */ | 202 | * whether we should autoresume when a SCSI request arrives. */ |
@@ -215,7 +214,6 @@ static int storage_resume(struct usb_interface *iface) | |||
215 | US_DEBUGP("%s\n", __FUNCTION__); | 214 | US_DEBUGP("%s\n", __FUNCTION__); |
216 | if (us->suspend_resume_hook) | 215 | if (us->suspend_resume_hook) |
217 | (us->suspend_resume_hook)(us, US_RESUME); | 216 | (us->suspend_resume_hook)(us, US_RESUME); |
218 | iface->dev.power.power_state.event = PM_EVENT_ON; | ||
219 | 217 | ||
220 | mutex_unlock(&us->dev_mutex); | 218 | mutex_unlock(&us->dev_mutex); |
221 | return 0; | 219 | return 0; |