X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fdriver.c;h=3d7793d93031525400d3ed746a60639ebed1d52f;hb=5579a782ad7ffa162b1060993e4a298dd50e7a33;hp=5a7fa6f099584206536c40b21dde9117b79cd5e1;hpb=b8cd9d056bbc5f2630ab1787dbf76f83bbb517c0;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 5a7fa6f0995..3d7793d9303 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1070,7 +1070,8 @@ static int autosuspend_check(struct usb_device *udev, int reschedule) struct usb_driver *driver; driver = to_usb_driver(intf->dev.driver); - if (!driver->reset_resume) + if (!driver->reset_resume || + intf->needs_remote_wakeup) return -EOPNOTSUPP; } } @@ -1609,7 +1610,8 @@ int usb_external_resume_device(struct usb_device *udev) status = usb_resume_both(udev); udev->last_busy = jiffies; usb_pm_unlock(udev); - do_unbind_rebind(udev, DO_REBIND); + if (status == 0) + do_unbind_rebind(udev, DO_REBIND); /* Now that the device is awake, we can start trying to autosuspend * it again. */