summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authortom.leiming@gmail.com <tom.leiming@gmail.com>2012-06-11 15:19:40 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-12 18:50:23 -0700
commit5c2f05139ad9459979b3102846fa61347896d148 (patch)
tree19848cfb2f2b2ffbaec654342fdf6160615e8db0 /drivers
parentef9d884dadd4c9f2c8432a6b82309ae4a133a35d (diff)
usbnet:pegasus: 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/pegasus.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 7023220456c5..a0b5807b30d4 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -1329,8 +1329,6 @@ static int pegasus_probe(struct usb_interface *intf,
}
pegasus_count++;
- usb_get_dev(dev);
-
net = alloc_etherdev(sizeof(struct pegasus));
if (!net)
goto out;
@@ -1407,7 +1405,6 @@ out2:
out1:
free_netdev(net);
out:
- usb_put_dev(dev);
pegasus_dec_workqueue();
return res;
}
@@ -1425,7 +1422,6 @@ static void pegasus_disconnect(struct usb_interface *intf)
pegasus->flags |= PEGASUS_UNPLUG;
cancel_delayed_work(&pegasus->carrier_check);
unregister_netdev(pegasus->net);
- usb_put_dev(interface_to_usbdev(intf));
unlink_all_urbs(pegasus);
free_all_urbs(pegasus);
free_skb_pool(pegasus);