From 0534d46848990e8eed7cd0832d745d813e827261 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Fri, 8 Jan 2010 12:56:30 -0500 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/usb.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/usb/core/usb.h') diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 4c36c7f512a..2b74a7f99c4 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -63,6 +63,7 @@ extern int usb_external_suspend_device(struct usb_device *udev, pm_message_t msg); extern int usb_external_resume_device(struct usb_device *udev, pm_message_t msg); +extern int usb_remote_wakeup(struct usb_device *dev); static inline void usb_pm_lock(struct usb_device *udev) { @@ -86,6 +87,11 @@ static inline int usb_port_resume(struct usb_device *udev, pm_message_t msg) return 0; } +static inline int usb_remote_wakeup(struct usb_device *udev) +{ + return 0; +} + static inline void usb_pm_lock(struct usb_device *udev) {} static inline void usb_pm_unlock(struct usb_device *udev) {} -- cgit v1.2.3