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>
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 1103ce70..7e8e123 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -750,12 +750,16 @@
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;