summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-wdm.c
diff options
context:
space:
mode:
authorOliver Neukum2008-07-01 19:10:08 +0200
committerGreg Kroah-Hartman2008-07-22 00:16:47 +0200
commit357585892e56f7c7bec4a9c8dfaf90257c8756c6 (patch)
treeec92dcc9afd457bea8fad66f39e73c2a2e878231 /drivers/usb/class/cdc-wdm.c
parentUSB: remove board-specific UP2OCR configuration from pxa27x-udc (diff)
downloadkernel-qcow2-linux-357585892e56f7c7bec4a9c8dfaf90257c8756c6.tar.gz
kernel-qcow2-linux-357585892e56f7c7bec4a9c8dfaf90257c8756c6.tar.xz
kernel-qcow2-linux-357585892e56f7c7bec4a9c8dfaf90257c8756c6.zip
USB: fix build error in cdc-acm for CONFIG_PM=n
Here's the fix. cdc-wdm has the same problem. The fix is the same. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r--drivers/usb/class/cdc-wdm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 1103ce7016b1..7e8e1235e4e5 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -750,12 +750,16 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
mutex_lock(&desc->plock);
+#ifdef CONFIG_PM
if (interface_to_usbdev(desc->intf)->auto_pm && test_bit(WDM_IN_USE, &desc->flags)) {
rv = -EBUSY;
} else {
+#endif
cancel_work_sync(&desc->rxwork);
kill_urbs(desc);
+#ifdef CONFIG_PM
}
+#endif
mutex_unlock(&desc->plock);
return rv;