driver.c (6b157c9bf3bace6eeb4a973da63923ef24995cce) | driver.c (eaafbc3a8adab16babe2c20e54ad3ba40d1fbbc9) |
---|---|
1/* 2 * drivers/usb/driver.c - most of the driver model stuff for usb 3 * 4 * (C) Copyright 2005 Greg Kroah-Hartman <gregkh@suse.de> 5 * 6 * based on drivers/usb/usb.c which had the following copyrights: 7 * (C) Copyright Linus Torvalds 1999 8 * (C) Copyright Johannes Erdfelt 1999-2001 --- 956 unchanged lines hidden (view full) --- 965 966 /* For autosuspend, fail fast if anything is in use or autosuspend 967 * is disabled. Also fail if any interfaces require remote wakeup 968 * but it isn't available. 969 */ 970 udev->do_remote_wakeup = device_may_wakeup(&udev->dev); 971 if (udev->pm_usage_cnt > 0) 972 return -EBUSY; | 1/* 2 * drivers/usb/driver.c - most of the driver model stuff for usb 3 * 4 * (C) Copyright 2005 Greg Kroah-Hartman <gregkh@suse.de> 5 * 6 * based on drivers/usb/usb.c which had the following copyrights: 7 * (C) Copyright Linus Torvalds 1999 8 * (C) Copyright Johannes Erdfelt 1999-2001 --- 956 unchanged lines hidden (view full) --- 965 966 /* For autosuspend, fail fast if anything is in use or autosuspend 967 * is disabled. Also fail if any interfaces require remote wakeup 968 * but it isn't available. 969 */ 970 udev->do_remote_wakeup = device_may_wakeup(&udev->dev); 971 if (udev->pm_usage_cnt > 0) 972 return -EBUSY; |
973 if (!udev->autosuspend_delay) | 973 if (udev->autosuspend_delay < 0) |
974 return -EPERM; 975 976 if (udev->actconfig) { 977 for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) { 978 intf = udev->actconfig->interface[i]; 979 if (!is_active(intf)) 980 continue; 981 if (intf->pm_usage_cnt > 0) --- 526 unchanged lines hidden --- | 974 return -EPERM; 975 976 if (udev->actconfig) { 977 for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) { 978 intf = udev->actconfig->interface[i]; 979 if (!is_active(intf)) 980 continue; 981 if (intf->pm_usage_cnt > 0) --- 526 unchanged lines hidden --- |