[PATCH -next] staging/bcm: fix build for CONFIG_PM not enabled

Randy Dunlap randy.dunlap at oracle.com
Tue Sep 14 22:39:50 UTC 2010


From: Randy Dunlap <randy.dunlap at oracle.com>

Handle build case of CONFIG_PM not being enabled.

drivers/staging/bcm/InterfaceInit.c:280: error: 'struct usb_device' has no member named 'autosuspend_delay'

Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
---
 drivers/staging/bcm/InterfaceInit.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20100913.orig/drivers/staging/bcm/InterfaceInit.c
+++ linux-next-20100913/drivers/staging/bcm/InterfaceInit.c
@@ -277,6 +277,7 @@ usbbcm_device_probe(struct usb_interface
 		/* If Suspend then only support dynamic suspend */
 		if(psAdapter->bDoSuspend)
 		{
+#ifdef CONFIG_PM
 			udev->autosuspend_delay = 0;
 			intf->needs_remote_wakeup = 1;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
@@ -290,6 +291,7 @@ usbbcm_device_probe(struct usb_interface
 #endif
 			INIT_WORK(&psIntfAdapter->usbSuspendWork, putUsbSuspend);
 			BCM_DEBUG_PRINT(psAdapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Enabling USB Auto-Suspend\n");
+#endif
 		}
 		else
 		{



More information about the devel mailing list