summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-10-13 17:08:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 16:47:44 -0700
commit0c0382e32d46f606951010b202382be14d180a17 (patch)
tree078327baa96637ca6d70bae3c59a16b0ff46f1f1 /drivers/usb/core/hcd.c
parentbb200f6eac6372839921be1fe87c1f5c292a7bd6 (diff)
downloadop-kernel-dev-0c0382e32d46f606951010b202382be14d180a17.zip
op-kernel-dev-0c0382e32d46f606951010b202382be14d180a17.tar.gz
[PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspend
This patch (as580) is perhaps the only result from the long discussion I had with David about his changes to the root-hub suspend/resume code. It renames the hub_suspend and hub_resume methods in struct usb_hcd to bus_suspend and bus_resume. These are more descriptive names, since the methods really do suspend or resume an entire USB bus, and less likely to be confused with the hub_suspend and hub_resume routines in hub.c. It also takes David's advice about removing the layer of bus glue, where those methods are called. And it implements a related change that David made to the other HCDs but forgot to put into dummy_hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r--drivers/usb/core/hcd.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index b7bb8dd..9ad3912 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1433,16 +1433,16 @@ rescan:
#ifdef CONFIG_PM
-static int hcd_hub_suspend (struct usb_bus *bus)
+int hcd_bus_suspend (struct usb_bus *bus)
{
struct usb_hcd *hcd;
int status;
hcd = container_of (bus, struct usb_hcd, self);
- if (!hcd->driver->hub_suspend)
+ if (!hcd->driver->bus_suspend)
return -ENOENT;
hcd->state = HC_STATE_QUIESCING;
- status = hcd->driver->hub_suspend (hcd);
+ status = hcd->driver->bus_suspend (hcd);
if (status == 0)
hcd->state = HC_STATE_SUSPENDED;
else
@@ -1451,18 +1451,18 @@ static int hcd_hub_suspend (struct usb_bus *bus)
return status;
}
-static int hcd_hub_resume (struct usb_bus *bus)
+int hcd_bus_resume (struct usb_bus *bus)
{
struct usb_hcd *hcd;
int status;
hcd = container_of (bus, struct usb_hcd, self);
- if (!hcd->driver->hub_resume)
+ if (!hcd->driver->bus_resume)
return -ENOENT;
if (hcd->state == HC_STATE_RUNNING)
return 0;
hcd->state = HC_STATE_RESUMING;
- status = hcd->driver->hub_resume (hcd);
+ status = hcd->driver->bus_resume (hcd);
if (status == 0)
hcd->state = HC_STATE_RUNNING;
else {
@@ -1590,10 +1590,6 @@ static struct usb_operations usb_hcd_operations = {
.buffer_alloc = hcd_buffer_alloc,
.buffer_free = hcd_buffer_free,
.disable = hcd_endpoint_disable,
-#ifdef CONFIG_PM
- .hub_suspend = hcd_hub_suspend,
- .hub_resume = hcd_hub_resume,
-#endif
};
/*-------------------------------------------------------------------------*/
OpenPOWER on IntegriCloud