summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortom.leiming@gmail.com <tom.leiming@gmail.com>2012-06-11 15:19:41 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-12 18:50:23 -0700
commit50e7d153910b0735aa517c3d1f3723a88f66eaba (patch)
tree6c90ef6aab55bea6e86f8baead458b5fab67ed92
parent5c2f05139ad9459979b3102846fa61347896d148 (diff)
downloadblackbird-op-linux-50e7d153910b0735aa517c3d1f3723a88f66eaba.tar.gz
blackbird-op-linux-50e7d153910b0735aa517c3d1f3723a88f66eaba.zip
usbnet:cdc-phonet: 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>
-rw-r--r--drivers/net/usb/cdc-phonet.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index d848d4dd5754..187c144c5e5b 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -394,7 +394,7 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id)
SET_NETDEV_DEV(dev, &intf->dev);
pnd->dev = dev;
- pnd->usb = usb_get_dev(usbdev);
+ pnd->usb = usbdev;
pnd->intf = intf;
pnd->data_intf = data_intf;
spin_lock_init(&pnd->tx_lock);
@@ -440,7 +440,6 @@ out:
static void usbpn_disconnect(struct usb_interface *intf)
{
struct usbpn_dev *pnd = usb_get_intfdata(intf);
- struct usb_device *usb = pnd->usb;
if (pnd->disconnected)
return;
@@ -449,7 +448,6 @@ static void usbpn_disconnect(struct usb_interface *intf)
usb_driver_release_interface(&usbpn_driver,
(pnd->intf == intf) ? pnd->data_intf : pnd->intf);
unregister_netdev(pnd->dev);
- usb_put_dev(usb);
}
static struct usb_driver usbpn_driver = {
OpenPOWER on IntegriCloud