diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-04-03 18:03:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:48 -0400 |
commit | 7be7d7418776a41badce7ca00246e270d408e4b9 (patch) | |
tree | 8d3de8a987f917ceb347b9e4c9e14eebbf6b8f61 /drivers/usb/core | |
parent | 7329e211b987a493cbcfca0e98c60eb108ab42df (diff) |
USB: clarify usage of hcd->suspend/resume methods
The .suspend and .resume method pointers in struct usb_hcd have not
been fully understood by host-controller driver writers. They are
meant for use with PCI controllers; other platform-specific drivers
generally should not refer to them.
To try and clarify matters, this patch (as1065) renames those methods
to .pci_suspend and .pci_resume. It eliminates corresponding dead code
and bogus references in the ohci-ssb and u132-hcd drivers.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 10 | ||||
-rw-r--r-- | drivers/usb/core/hcd.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 739407bb8492..5b87ae7f0a6a 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -215,9 +215,9 @@ int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t message) | |||
215 | hcd->state == HC_STATE_HALT)) | 215 | hcd->state == HC_STATE_HALT)) |
216 | return -EBUSY; | 216 | return -EBUSY; |
217 | 217 | ||
218 | if (hcd->driver->suspend) { | 218 | if (hcd->driver->pci_suspend) { |
219 | retval = hcd->driver->suspend(hcd, message); | 219 | retval = hcd->driver->pci_suspend(hcd, message); |
220 | suspend_report_result(hcd->driver->suspend, retval); | 220 | suspend_report_result(hcd->driver->pci_suspend, retval); |
221 | if (retval) | 221 | if (retval) |
222 | goto done; | 222 | goto done; |
223 | } | 223 | } |
@@ -405,8 +405,8 @@ int usb_hcd_pci_resume(struct pci_dev *dev) | |||
405 | 405 | ||
406 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | 406 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); |
407 | 407 | ||
408 | if (hcd->driver->resume) { | 408 | if (hcd->driver->pci_resume) { |
409 | retval = hcd->driver->resume(hcd); | 409 | retval = hcd->driver->pci_resume(hcd); |
410 | if (retval) { | 410 | if (retval) { |
411 | dev_err(hcd->self.controller, | 411 | dev_err(hcd->self.controller, |
412 | "PCI post-resume error %d!\n", retval); | 412 | "PCI post-resume error %d!\n", retval); |
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index e0e99471c3fc..3ba258eb05de 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h | |||
@@ -178,10 +178,10 @@ struct hc_driver { | |||
178 | * a whole, not just the root hub; they're for PCI bus glue. | 178 | * a whole, not just the root hub; they're for PCI bus glue. |
179 | */ | 179 | */ |
180 | /* called after suspending the hub, before entering D3 etc */ | 180 | /* called after suspending the hub, before entering D3 etc */ |
181 | int (*suspend) (struct usb_hcd *hcd, pm_message_t message); | 181 | int (*pci_suspend) (struct usb_hcd *hcd, pm_message_t message); |
182 | 182 | ||
183 | /* called after entering D0 (etc), before resuming the hub */ | 183 | /* called after entering D0 (etc), before resuming the hub */ |
184 | int (*resume) (struct usb_hcd *hcd); | 184 | int (*pci_resume) (struct usb_hcd *hcd); |
185 | 185 | ||
186 | /* cleanly make HCD stop writing memory and doing I/O */ | 186 | /* cleanly make HCD stop writing memory and doing I/O */ |
187 | void (*stop) (struct usb_hcd *hcd); | 187 | void (*stop) (struct usb_hcd *hcd); |