aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
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/gadget
parentbb200f6eac6372839921be1fe87c1f5c292a7bd6 (diff)
[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/gadget')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 503201764f6..c605aaeed63 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1751,7 +1751,7 @@ static int dummy_hub_control (
return retval;
}
-static int dummy_hub_suspend (struct usb_hcd *hcd)
+static int dummy_bus_suspend (struct usb_hcd *hcd)
{
struct dummy *dum = hcd_to_dummy (hcd);
@@ -1762,7 +1762,7 @@ static int dummy_hub_suspend (struct usb_hcd *hcd)
return 0;
}
-static int dummy_hub_resume (struct usb_hcd *hcd)
+static int dummy_bus_resume (struct usb_hcd *hcd)
{
struct dummy *dum = hcd_to_dummy (hcd);
@@ -1894,8 +1894,8 @@ static const struct hc_driver dummy_hcd = {
.hub_status_data = dummy_hub_status,
.hub_control = dummy_hub_control,
- .hub_suspend = dummy_hub_suspend,
- .hub_resume = dummy_hub_resume,
+ .bus_suspend = dummy_bus_suspend,
+ .bus_resume = dummy_bus_resume,
};
static int dummy_hcd_probe (struct device *dev)
@@ -1936,13 +1936,6 @@ static int dummy_hcd_suspend (struct device *dev, pm_message_t state)
dev_dbg (dev, "%s\n", __FUNCTION__);
hcd = dev_get_drvdata (dev);
-#ifndef CONFIG_USB_SUSPEND
- /* Otherwise this would never happen */
- usb_lock_device (hcd->self.root_hub);
- dummy_hub_suspend (hcd);
- usb_unlock_device (hcd->self.root_hub);
-#endif
-
hcd->state = HC_STATE_SUSPENDED;
return 0;
}
@@ -1955,13 +1948,6 @@ static int dummy_hcd_resume (struct device *dev)
hcd = dev_get_drvdata (dev);
hcd->state = HC_STATE_RUNNING;
-#ifndef CONFIG_USB_SUSPEND
- /* Otherwise this would never happen */
- usb_lock_device (hcd->self.root_hub);
- dummy_hub_resume (hcd);
- usb_unlock_device (hcd->self.root_hub);
-#endif
-
usb_hcd_poll_rh_status (hcd);
return 0;
}