From a070bd249fd2d73b4fcca3f046df3719209ce41a Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 22 Jun 2010 16:14:48 -0400 Subject: [PATCH] --- yaml --- r: 200683 b: refs/heads/master c: 48826626263d4a61d06fd8c5805da31f925aefa0 h: refs/heads/master i: 200681: 50a707c65695f0fb2f3c8196e90ec3ee932f8693 200679: 6179ca0aaadd7807d337359668d007f2091a0759 v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/driver.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 953efea9fe71..4f98eda7cb3f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 03ab7461df3c74c9418c3f5485ea1127ece1ff79 +refs/heads/master: 48826626263d4a61d06fd8c5805da31f925aefa0 diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index de98a94d1853..a6bd53ace035 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -1272,8 +1272,7 @@ static int usb_resume_both(struct usb_device *udev, pm_message_t msg) static void choose_wakeup(struct usb_device *udev, pm_message_t msg) { - int w, i; - struct usb_interface *intf; + int w; /* Remote wakeup is needed only when we actually go to sleep. * For things like FREEZE and QUIESCE, if the device is already @@ -1285,16 +1284,10 @@ static void choose_wakeup(struct usb_device *udev, pm_message_t msg) return; } - /* If remote wakeup is permitted, see whether any interface drivers + /* Enable remote wakeup if it is allowed, even if no interface drivers * actually want it. */ - w = 0; - if (device_may_wakeup(&udev->dev) && udev->actconfig) { - for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) { - intf = udev->actconfig->interface[i]; - w |= intf->needs_remote_wakeup; - } - } + w = device_may_wakeup(&udev->dev); /* If the device is autosuspended with the wrong wakeup setting, * autoresume now so the setting can be changed.