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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7329e211b9
commit
7be7d74187
@@ -215,9 +215,9 @@ int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t message)
|
||||
hcd->state == HC_STATE_HALT))
|
||||
return -EBUSY;
|
||||
|
||||
if (hcd->driver->suspend) {
|
||||
retval = hcd->driver->suspend(hcd, message);
|
||||
suspend_report_result(hcd->driver->suspend, retval);
|
||||
if (hcd->driver->pci_suspend) {
|
||||
retval = hcd->driver->pci_suspend(hcd, message);
|
||||
suspend_report_result(hcd->driver->pci_suspend, retval);
|
||||
if (retval)
|
||||
goto done;
|
||||
}
|
||||
@@ -405,8 +405,8 @@ int usb_hcd_pci_resume(struct pci_dev *dev)
|
||||
|
||||
clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
|
||||
|
||||
if (hcd->driver->resume) {
|
||||
retval = hcd->driver->resume(hcd);
|
||||
if (hcd->driver->pci_resume) {
|
||||
retval = hcd->driver->pci_resume(hcd);
|
||||
if (retval) {
|
||||
dev_err(hcd->self.controller,
|
||||
"PCI post-resume error %d!\n", retval);
|
||||
|
@@ -178,10 +178,10 @@ struct hc_driver {
|
||||
* a whole, not just the root hub; they're for PCI bus glue.
|
||||
*/
|
||||
/* called after suspending the hub, before entering D3 etc */
|
||||
int (*suspend) (struct usb_hcd *hcd, pm_message_t message);
|
||||
int (*pci_suspend) (struct usb_hcd *hcd, pm_message_t message);
|
||||
|
||||
/* called after entering D0 (etc), before resuming the hub */
|
||||
int (*resume) (struct usb_hcd *hcd);
|
||||
int (*pci_resume) (struct usb_hcd *hcd);
|
||||
|
||||
/* cleanly make HCD stop writing memory and doing I/O */
|
||||
void (*stop) (struct usb_hcd *hcd);
|
||||
|
Reference in New Issue
Block a user