diff options
author | tom.leiming@gmail.com <tom.leiming@gmail.com> | 2012-06-11 15:19:39 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-12 18:50:23 -0700 |
commit | ef9d884dadd4c9f2c8432a6b82309ae4a133a35d (patch) | |
tree | 6edccc421e257aa1f70c3fec32fdc940758755ee /drivers/net/usb/usbnet.c | |
parent | d0daebc3d622f95db181601cb0c4a0781f74f758 (diff) | |
download | linux-ef9d884dadd4c9f2c8432a6b82309ae4a133a35d.tar.gz linux-ef9d884dadd4c9f2c8432a6b82309ae4a133a35d.tar.bz2 linux-ef9d884dadd4c9f2c8432a6b82309ae4a133a35d.zip |
usbnet: remove usb_get/put_dev in .probe and .disconnect
usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.
This patch just removes the unnecessay usb_get/put_dev.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r-- | drivers/net/usb/usbnet.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 9f58330f1312..022c1e72d004 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1307,7 +1307,6 @@ void usbnet_disconnect (struct usb_interface *intf) usb_free_urb(dev->interrupt); free_netdev(net); - usb_put_dev (xdev); } EXPORT_SYMBOL_GPL(usbnet_disconnect); @@ -1363,8 +1362,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) xdev = interface_to_usbdev (udev); interface = udev->cur_altsetting; - usb_get_dev (xdev); - status = -ENOMEM; // set up our own records @@ -1493,7 +1490,6 @@ out3: out1: free_netdev(net); out: - usb_put_dev(xdev); return status; } EXPORT_SYMBOL_GPL(usbnet_probe); |