Commit 7fd1f9d6 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: udc: net2272: do not call usb_gadget_unregister_driver()

that call is completely unnecessary because
usb_del_gadget_udc() already makes sure the
gadget driver is properly unregistered from
the UDC.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c77f570f
...@@ -2195,18 +2195,8 @@ static void ...@@ -2195,18 +2195,8 @@ static void
net2272_remove(struct net2272 *dev) net2272_remove(struct net2272 *dev)
{ {
usb_del_gadget_udc(&dev->gadget); usb_del_gadget_udc(&dev->gadget);
/* start with the driver above us */
if (dev->driver) {
/* should have been done already by driver model core */
dev_warn(dev->dev, "pci remove, driver '%s' is still registered\n",
dev->driver->driver.name);
usb_gadget_unregister_driver(dev->driver);
}
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
iounmap(dev->base_addr); iounmap(dev->base_addr);
device_remove_file(dev->dev, &dev_attr_registers); device_remove_file(dev->dev, &dev_attr_registers);
dev_info(dev->dev, "unbind\n"); dev_info(dev->dev, "unbind\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment