diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-05-21 11:29:01 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-05-21 12:00:03 -0400 |
commit | e9261fb62a8b6a79a58c57cc6f4a40530b040b61 (patch) | |
tree | 74b4b2d1c1d2a183983ba4d0104b7b2c98e8173c /drivers/usb | |
parent | c51fa66802b922070dfda0d77fac364c367db5f6 (diff) |
USB: Fix core compile with CONFIG_USB_SUSPEND=n
When CONFIG_PM=n, make sure that the usb_[unlocked_][en/dis]able_lpm
declarations are visible in include/linux/usb.h, and exported from
drivers/usb/core/hub.c.
Before this patch, if CONFIG_USB_SUSPEND was turned off, it would cause
build errors:
drivers/usb/core/hub.c: In function 'usb_disable_lpm':
drivers/usb/core/hub.c:3394:2: error: implicit declaration of function 'usb_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/hub.c: At top level:
drivers/usb/core/hub.c:3424:6: warning: conflicting types for 'usb_enable_lpm' [enabled by default]
drivers/usb/core/hub.c:3394:2: note: previous implicit declaration of 'usb_enable_lpm' was here
drivers/usb/core/driver.c: In function 'usb_probe_interface':
drivers/usb/core/driver.c:339:2: error: implicit declaration of function 'usb_unlocked_disable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/driver.c:364:3: error: implicit declaration of function 'usb_unlocked_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c: In function 'usb_set_interface':
drivers/usb/core/message.c:1314:2: error: implicit declaration of function 'usb_disable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c:1323:3: error: implicit declaration of function 'usb_enable_lpm' [-Werror=implicit-function-declaration]
drivers/usb/core/message.c:1368:2: error: implicit declaration of function 'usb_unlocked_enable_lpm' [-Werror=implicit-function-declaration]
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Chen Peter-B29397 <B29397@freescale.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index fcc244e9056f..04fb834c3fa1 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -3472,15 +3472,19 @@ int usb_disable_lpm(struct usb_device *udev) | |||
3472 | { | 3472 | { |
3473 | return 0; | 3473 | return 0; |
3474 | } | 3474 | } |
3475 | EXPORT_SYMBOL_GPL(usb_disable_lpm); | ||
3475 | 3476 | ||
3476 | void usb_enable_lpm(struct usb_device *udev) { } | 3477 | void usb_enable_lpm(struct usb_device *udev) { } |
3478 | EXPORT_SYMBOL_GPL(usb_enable_lpm); | ||
3477 | 3479 | ||
3478 | int usb_unlocked_disable_lpm(struct usb_device *udev) | 3480 | int usb_unlocked_disable_lpm(struct usb_device *udev) |
3479 | { | 3481 | { |
3480 | return 0; | 3482 | return 0; |
3481 | } | 3483 | } |
3484 | EXPORT_SYMBOL_GPL(usb_unlocked_disable_lpm); | ||
3482 | 3485 | ||
3483 | void usb_unlocked_enable_lpm(struct usb_device *udev) { } | 3486 | void usb_unlocked_enable_lpm(struct usb_device *udev) { } |
3487 | EXPORT_SYMBOL_GPL(usb_unlocked_enable_lpm); | ||
3484 | #endif | 3488 | #endif |
3485 | 3489 | ||
3486 | 3490 | ||