summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-01-08 12:56:30 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:08 -0800
commit0534d46848990e8eed7cd0832d745d813e827261 (patch)
treed861a679f0471a8e5c243720c507c7c43c363d7f /drivers/usb/core/hub.c
parent62e299e61a6ffe8131fa85a984c3058b68586f5d (diff)
USB: consolidate remote wakeup routines
This patch (as1324) makes a small change to the code used for remote wakeup of root hubs. hcd_resume_work() now calls the hub driver's remote-wakeup routine instead of implementing its own version. The patch is complicated by the need to rename remote_wakeup() to usb_remote_wakeup(), make it non-static, and declare it in a header file. There's also the additional complication required to make everything work when CONFIG_PM isn't set; the do-nothing inline routine had to be moved into the header file. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4986ff628465..bfa6123bbdb5 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2399,7 +2399,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
}
/* caller has locked udev */
-static int remote_wakeup(struct usb_device *udev)
+int usb_remote_wakeup(struct usb_device *udev)
{
int status = 0;
@@ -2443,7 +2443,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
return status;
}
-static inline int remote_wakeup(struct usb_device *udev)
+int usb_remote_wakeup(struct usb_device *udev)
{
return 0;
}
@@ -2514,11 +2514,6 @@ EXPORT_SYMBOL_GPL(usb_root_hub_lost_power);
#else /* CONFIG_PM */
-static inline int remote_wakeup(struct usb_device *udev)
-{
- return 0;
-}
-
#define hub_suspend NULL
#define hub_resume NULL
#define hub_reset_resume NULL
@@ -3017,7 +3012,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
/* For a suspended device, treat this as a
* remote wakeup event.
*/
- status = remote_wakeup(udev);
+ status = usb_remote_wakeup(udev);
#endif
} else {
@@ -3363,7 +3358,7 @@ static void hub_events(void)
msleep(10);
usb_lock_device(udev);
- ret = remote_wakeup(hdev->
+ ret = usb_remote_wakeup(hdev->
children[i-1]);
usb_unlock_device(udev);
if (ret < 0)