diff options
author | tom.leiming@gmail.com <tom.leiming@gmail.com> | 2012-06-11 11:19:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-12 21:50:23 -0400 |
commit | ef9d884dadd4c9f2c8432a6b82309ae4a133a35d (patch) | |
tree | 6edccc421e257aa1f70c3fec32fdc940758755ee /drivers | |
parent | d0daebc3d622f95db181601cb0c4a0781f74f758 (diff) |
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')
-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) | |||
1307 | usb_free_urb(dev->interrupt); | 1307 | usb_free_urb(dev->interrupt); |
1308 | 1308 | ||
1309 | free_netdev(net); | 1309 | free_netdev(net); |
1310 | usb_put_dev (xdev); | ||
1311 | } | 1310 | } |
1312 | EXPORT_SYMBOL_GPL(usbnet_disconnect); | 1311 | EXPORT_SYMBOL_GPL(usbnet_disconnect); |
1313 | 1312 | ||
@@ -1363,8 +1362,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1363 | xdev = interface_to_usbdev (udev); | 1362 | xdev = interface_to_usbdev (udev); |
1364 | interface = udev->cur_altsetting; | 1363 | interface = udev->cur_altsetting; |
1365 | 1364 | ||
1366 | usb_get_dev (xdev); | ||
1367 | |||
1368 | status = -ENOMEM; | 1365 | status = -ENOMEM; |
1369 | 1366 | ||
1370 | // set up our own records | 1367 | // set up our own records |
@@ -1493,7 +1490,6 @@ out3: | |||
1493 | out1: | 1490 | out1: |
1494 | free_netdev(net); | 1491 | free_netdev(net); |
1495 | out: | 1492 | out: |
1496 | usb_put_dev(xdev); | ||
1497 | return status; | 1493 | return status; |
1498 | } | 1494 | } |
1499 | EXPORT_SYMBOL_GPL(usbnet_probe); | 1495 | EXPORT_SYMBOL_GPL(usbnet_probe); |