diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-27 16:55:29 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-05 16:28:37 -0700 |
commit | 3d81c4733b6b25c0b99c3c3c16cfd93183c27b03 (patch) | |
tree | b2b8fe28baae65303a89c98853bd49b369cb8111 | |
parent | 569ae35a436502bf1aaaa7391b94e1d04b61ffca (diff) | |
download | lwn-3d81c4733b6b25c0b99c3c3c16cfd93183c27b03.tar.gz lwn-3d81c4733b6b25c0b99c3c3c16cfd93183c27b03.zip |
USB: fix build error with CONFIG_PM_RUNTIME disabled
commit a9ef803d740bfadf5e505fbc57efa57692e27025 upstream.
commit bdd405d2a528 ("usb: hub: Prevent hub autosuspend if
usbcore.autosuspend is -1") causes a build error if CONFIG_PM_RUNTIME is
disabled. Fix that by doing a simple #ifdef guard around it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Michael Welling <mwelling@emacinc.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/core/hub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 813697d72466..a5631849017f 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1703,8 +1703,10 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) * - If user has indicated to prevent autosuspend by passing * usbcore.autosuspend = -1 then keep autosuspend disabled. */ +#ifdef CONFIG_PM_RUNTIME if (hdev->dev.power.autosuspend_delay >= 0) pm_runtime_set_autosuspend_delay(&hdev->dev, 0); +#endif /* * Hubs have proper suspend/resume support, except for root hubs |