提交 ef9d884d 编写于 作者: T tom.leiming@gmail.com 提交者: David S. Miller

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: NMing Lei <tom.leiming@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d0daebc3
......@@ -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 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
out1:
free_netdev(net);
out:
usb_put_dev(xdev);
return status;
}
EXPORT_SYMBOL_GPL(usbnet_probe);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册