Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221613
b: refs/heads/master
c: b0786b4
h: refs/heads/master
i:
  221611: 4b23eab
v: v3
  • Loading branch information
Ming Lei authored and David S. Miller committed Nov 1, 2010
1 parent cd5a92d commit 4f53652
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f9b901823aafd14a84ae27f61ff28bafed01260
refs/heads/master: b0786b430c982dffbb44d8030e6b6088671ce745
11 changes: 11 additions & 0 deletions trunk/drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/pm_runtime.h>

#define DRIVER_VERSION "22-Aug-2005"

Expand Down Expand Up @@ -1273,6 +1274,16 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
struct usb_device *xdev;
int status;
const char *name;
struct usb_driver *driver = to_usb_driver(udev->dev.driver);

/* usbnet already took usb runtime pm, so have to enable the feature
* for usb interface, otherwise usb_autopm_get_interface may return
* failure if USB_SUSPEND(RUNTIME_PM) is enabled.
*/
if (!driver->supports_autosuspend) {
driver->supports_autosuspend = 1;
pm_runtime_enable(&udev->dev);
}

name = udev->dev.driver->name;
info = (struct driver_info *) prod->driver_info;
Expand Down

0 comments on commit 4f53652

Please sign in to comment.