mirror of https://gitee.com/openkylin/linux.git
staging/bcm: fix build for CONFIG_PM not enabled
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@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
3e8acee461
commit
5fe1f1edb9
|
@ -277,6 +277,7 @@ usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||||
/* If Suspend then only support dynamic suspend */
|
/* If Suspend then only support dynamic suspend */
|
||||||
if(psAdapter->bDoSuspend)
|
if(psAdapter->bDoSuspend)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_PM
|
||||||
udev->autosuspend_delay = 0;
|
udev->autosuspend_delay = 0;
|
||||||
intf->needs_remote_wakeup = 1;
|
intf->needs_remote_wakeup = 1;
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||||
|
@ -290,6 +291,7 @@ usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||||
#endif
|
#endif
|
||||||
INIT_WORK(&psIntfAdapter->usbSuspendWork, putUsbSuspend);
|
INIT_WORK(&psIntfAdapter->usbSuspendWork, putUsbSuspend);
|
||||||
BCM_DEBUG_PRINT(psAdapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Enabling USB Auto-Suspend\n");
|
BCM_DEBUG_PRINT(psAdapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Enabling USB Auto-Suspend\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue