[PATCH] USB: fix pm patches with CONFIG_PM off part 1
authorAndrew Morton <akpm@osdl.org>
Mon, 24 Oct 2005 06:04:25 +0000 (23:04 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:51 +0000 (16:47 -0700)
With CONFIG_PM=n:

drivers/built-in.o(.text+0x2a69c): In function `ohci_hub_control':
drivers/usb/host/ohci-hub.c:539: undefined reference to `.usb_hcd_resume_root_hub'
drivers/built-in.o(.text+0x2b920): In function `ohci_irq':
drivers/usb/host/ohci-hcd.c:726: undefined reference to `.usb_hcd_resume_root_hub'

Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.h

index a5d92943ff953385feda9d68efa3585218f72a1a..24a62a2ff86dd38b11dd3494069b99a8bd9882b2 100644 (file)
@@ -351,9 +351,6 @@ extern long usb_calc_bus_time (int speed, int is_input,
 
 extern struct usb_bus *usb_alloc_bus (struct usb_operations *);
 
-extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
-extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
-
 extern void usb_set_device_state(struct usb_device *udev,
                enum usb_device_state new_state);
 
@@ -376,9 +373,21 @@ extern int usb_find_interface_driver (struct usb_device *dev,
 #define usb_endpoint_out(ep_dir)       (!((ep_dir) & USB_DIR_IN))
 
 #ifdef CONFIG_PM
+extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
+extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
 extern int hcd_bus_suspend (struct usb_bus *bus);
 extern int hcd_bus_resume (struct usb_bus *bus);
 #else
+static inline void usb_hcd_suspend_root_hub(struct usb_hcd *hcd)
+{
+       return;
+}
+
+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;