aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-07-01 22:14:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 11:58:50 -0700
commitd388dab7b562b76525761f89702246686747ba30 (patch)
tree5bd84a39fcd05800d83b8ba5df1262568ab130ae /drivers/usb/core/usb.h
parent1c5df7e705671f11a71112eb3a1f9765cd1719f9 (diff)
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 <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h11
1 files changed, 11 insertions, 0 deletions
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;