aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2008-07-01 13:10:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:16:47 -0400
commit357585892e56f7c7bec4a9c8dfaf90257c8756c6 (patch)
treeec92dcc9afd457bea8fad66f39e73c2a2e878231 /drivers
parent95f371f24c48b50e365f4c08d8f61eb8b15b3bba (diff)
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')
-rw-r--r--drivers/usb/class/cdc-acm.c7
-rw-r--r--drivers/usb/class/cdc-wdm.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 93b28ee8e8bd..95ae6377d7e5 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1255,6 +1255,7 @@ static void acm_disconnect(struct usb_interface *intf)
1255 tty_hangup(acm->tty); 1255 tty_hangup(acm->tty);
1256} 1256}
1257 1257
1258#ifdef CONFIG_PM
1258static int acm_suspend(struct usb_interface *intf, pm_message_t message) 1259static int acm_suspend(struct usb_interface *intf, pm_message_t message)
1259{ 1260{
1260 struct acm *acm = usb_get_intfdata(intf); 1261 struct acm *acm = usb_get_intfdata(intf);
@@ -1320,6 +1321,8 @@ err_out:
1320 mutex_unlock(&acm->mutex); 1321 mutex_unlock(&acm->mutex);
1321 return rv; 1322 return rv;
1322} 1323}
1324
1325#endif /* CONFIG_PM */
1323/* 1326/*
1324 * USB driver structure. 1327 * USB driver structure.
1325 */ 1328 */
@@ -1375,10 +1378,14 @@ static struct usb_driver acm_driver = {
1375 .name = "cdc_acm", 1378 .name = "cdc_acm",
1376 .probe = acm_probe, 1379 .probe = acm_probe,
1377 .disconnect = acm_disconnect, 1380 .disconnect = acm_disconnect,
1381#ifdef CONFIG_PM
1378 .suspend = acm_suspend, 1382 .suspend = acm_suspend,
1379 .resume = acm_resume, 1383 .resume = acm_resume,
1384#endif
1380 .id_table = acm_ids, 1385 .id_table = acm_ids,
1386#ifdef CONFIG_PM
1381 .supports_autosuspend = 1, 1387 .supports_autosuspend = 1,
1388#endif
1382}; 1389};
1383 1390
1384/* 1391/*
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;