[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>
This commit is contained in:
Alan Stern
2005-10-13 17:08:02 -04:00
committed by Greg Kroah-Hartman
parent bb200f6eac
commit 0c0382e32d
18 changed files with 72 additions and 79 deletions

View File

@@ -1917,8 +1917,8 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
/* "global suspend" of the downstream HC-to-USB interface */
if (!hdev->parent) {
struct usb_bus *bus = hdev->bus;
if (bus && bus->op->hub_suspend) {
int status = bus->op->hub_suspend (bus);
if (bus) {
int status = hcd_bus_suspend (bus);
if (status != 0) {
dev_dbg(&hdev->dev, "'global' suspend %d\n",
@@ -1943,8 +1943,8 @@ static int hub_resume(struct usb_interface *intf)
/* "global resume" of the downstream HC-to-USB interface */
if (!hdev->parent) {
struct usb_bus *bus = hdev->bus;
if (bus && bus->op->hub_resume) {
status = bus->op->hub_resume (bus);
if (bus) {
status = hcd_bus_resume (bus);
if (status) {
dev_dbg(&intf->dev, "'global' resume %d\n",
status);