diff options
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 4 |
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) | |||
750 | dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor); | 750 | dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor); |
751 | 751 | ||
752 | mutex_lock(&desc->plock); | 752 | mutex_lock(&desc->plock); |
753 | #ifdef CONFIG_PM | ||
753 | if (interface_to_usbdev(desc->intf)->auto_pm && test_bit(WDM_IN_USE, &desc->flags)) { | 754 | if (interface_to_usbdev(desc->intf)->auto_pm && test_bit(WDM_IN_USE, &desc->flags)) { |
754 | rv = -EBUSY; | 755 | rv = -EBUSY; |
755 | } else { | 756 | } else { |
757 | #endif | ||
756 | cancel_work_sync(&desc->rxwork); | 758 | cancel_work_sync(&desc->rxwork); |
757 | kill_urbs(desc); | 759 | kill_urbs(desc); |
760 | #ifdef CONFIG_PM | ||
758 | } | 761 | } |
762 | #endif | ||
759 | mutex_unlock(&desc->plock); | 763 | mutex_unlock(&desc->plock); |
760 | 764 | ||
761 | return rv; | 765 | return rv; |