From d388dab7b562b76525761f89702246686747ba30 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Sat, 1 Jul 2006 22:14:24 -0400 Subject: hub driver: improve use of #ifdef This patch (as736) makes the hub driver more readable by improving the usage of "#ifdef CONFIG_PM" and "#ifdef CONFIG_USB_SUSPEND". Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/usb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/usb/core/usb.h') diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 74df0db954c..98675fb1bc4 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -30,11 +30,22 @@ extern void usb_major_cleanup(void); extern int usb_host_init(void); extern void usb_host_cleanup(void); +#ifdef CONFIG_PM + extern int usb_suspend_both(struct usb_device *udev, pm_message_t msg); extern int usb_resume_both(struct usb_device *udev); extern int usb_port_suspend(struct usb_device *dev); extern int usb_port_resume(struct usb_device *dev); +#else + +#define usb_suspend_both(udev, msg) 0 +#define usb_resume_both(udev) 0 +#define usb_port_suspend(dev) 0 +#define usb_port_resume(dev) 0 + +#endif + extern struct bus_type usb_bus_type; extern struct usb_device_driver usb_generic_driver; -- cgit v1.2.3