From 686314cfbdac21c9019c0e04487b5d940db62406 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 30 May 2007 15:34:36 -0400 Subject: USB: separate root and non-root suspend/resume This patch (as916) completes the separation of code paths for suspend and resume of root hubs as opposed to non-root devices. Root hubs will be power-managed through their bus_suspend and bus_resume methods, whereas normal devices will use usb_port_suspend() and usb_port_resume(). Changes to the hcd_bus_{suspend,resume} routines mostly represent motion of code that was already present elsewhere. They include: Adding debugging log messages, Setting the device state appropriately, and Adding a resume recovery time delay. Changes to the port-suspend and port-resume routines in hub.c include: Removal of checks for root devices (since they will never be triggered), and Removal of checks for NULL or invalid device pointers (these were left over from earlier kernel versions and aren't needed at all). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hcd.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'drivers/usb/core/hcd.h') diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index ef50fa494e47..b5ebb73c2332 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h @@ -364,23 +364,13 @@ extern int usb_find_interface_driver (struct usb_device *dev, #ifdef CONFIG_PM extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd); extern void usb_root_hub_lost_power (struct usb_device *rhdev); -extern int hcd_bus_suspend (struct usb_bus *bus); -extern int hcd_bus_resume (struct usb_bus *bus); +extern int hcd_bus_suspend(struct usb_device *rhdev); +extern int hcd_bus_resume(struct usb_device *rhdev); #else static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) { return; } - -static inline int hcd_bus_suspend(struct usb_bus *bus) -{ - return 0; -} - -static inline int hcd_bus_resume (struct usb_bus *bus) -{ - return 0; -} #endif /* CONFIG_PM */ /* -- cgit v1.2.3