clk_put(u3d->clk);
- device_unregister(&u3d->gadget.dev);
-
platform_set_drvdata(dev, NULL);
kfree(u3d);
u3d->gadget.speed = USB_SPEED_UNKNOWN; /* speed */
/* the "gadget" abstracts/virtualizes the controller */
- dev_set_name(&u3d->gadget.dev, "gadget");
u3d->gadget.dev.parent = &dev->dev;
u3d->gadget.dev.dma_mask = dev->dev.dma_mask;
u3d->gadget.dev.release = mv_u3d_gadget_release;
u3d->gadget.name = driver_name; /* gadget name */
-
- retval = device_register(&u3d->gadget.dev);
- if (retval)
- goto err_register_gadget_device;
+ u3d->gadget.register_my_device = true;
mv_u3d_eps_init(u3d);
return 0;
err_unregister:
- device_unregister(&u3d->gadget.dev);
-err_register_gadget_device:
free_irq(u3d->irq, &dev->dev);
err_request_irq:
err_get_irq: