ci->gadget.dev.coherent_dma_mask = dev->coherent_dma_mask;
ci->gadget.dev.parent = dev;
ci->gadget.dev.release = udc_release;
- ci->gadget.register_my_device = true;
/* alloc resources */
ci->qh_pool = dma_pool_create("ci13xxx_qh", dev,
dwc->gadget.dev.dma_parms = dwc->dev->dma_parms;
dwc->gadget.dev.dma_mask = dwc->dev->dma_mask;
dwc->gadget.dev.release = dwc3_gadget_release;
- dwc->gadget.register_my_device = true;
dwc->gadget.name = "dwc3-gadget";
/*
dev->gadget.dev.release = gadget_release;
dev->gadget.name = name;
dev->gadget.max_speed = USB_SPEED_HIGH;
- dev->gadget.register_my_device = true;
/* init registers, interrupts, ... */
startup_registers(dev);
/* init software state */
udc = &controller;
- udc->gadget.register_my_device = true;
udc->gadget.dev.parent = dev;
if (pdev->dev.of_node)
at91udc_of_init(udc, pdev->dev.of_node);
udc->gadget.dev.parent = &pdev->dev;
udc->gadget.dev.dma_mask = pdev->dev.dma_mask;
- udc->gadget.register_my_device = true;
platform_set_drvdata(pdev, udc);
udc->gadget.dev.parent = dev;
udc->gadget.dev.release = bcm63xx_udc_gadget_release;
udc->gadget.dev.dma_mask = dev->dma_mask;
- udc->gadget.register_my_device = true;
if (!pd->use_fullspeed && !use_fullspeed)
udc->gadget.max_speed = USB_SPEED_HIGH;
dum->gadget.name = gadget_name;
dum->gadget.ops = &dummy_ops;
dum->gadget.max_speed = USB_SPEED_SUPER;
- dum->gadget.register_my_device = true;
dum->gadget.dev.parent = &pdev->dev;
dum->gadget.dev.release = dummy_gadget_release;
udc->gadget.name = driver_name;
udc->gadget.dev.release = qe_udc_release;
udc->gadget.dev.parent = &ofdev->dev;
- udc->gadget.register_my_device = true;
/* initialize qe_ep struct */
for (i = 0; i < USB_MAX_ENDPOINTS ; i++) {
udc_controller->gadget.dev.release = fsl_udc_release;
udc_controller->gadget.dev.parent = &pdev->dev;
udc_controller->gadget.dev.of_node = pdev->dev.of_node;
- udc_controller->gadget.register_my_device = true;
if (!IS_ERR_OR_NULL(udc_controller->transceiver))
udc_controller->gadget.is_otg = 1;
fusb300->gadget.dev.dma_mask = pdev->dev.dma_mask;
fusb300->gadget.dev.release = pdev->dev.release;
fusb300->gadget.name = udc_name;
- fusb300->gadget.register_my_device = true;
fusb300->reg = reg;
ret = request_irq(ires->start, fusb300_irq, IRQF_SHARED,
dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
dev->gadget.dev.release = gadget_release;
dev->gadget.name = driver_name;
- dev->gadget.register_my_device = true;
/* now all the pci goodies ... */
retval = pci_enable_device(pdev);
imx_usb->clk = clk;
imx_usb->dev = &pdev->dev;
- imx_usb->gadget.register_my_device = true;
imx_usb->gadget.dev.parent = &pdev->dev;
imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask;
/* init software state */
udc->gadget.dev.parent = dev;
- udc->gadget.register_my_device = true;
udc->pdev = pdev;
udc->dev = &pdev->dev;
udc->enabled = 0;
m66592->gadget.dev.dma_mask = pdev->dev.dma_mask;
m66592->gadget.dev.release = pdev->dev.release;
m66592->gadget.name = udc_name;
- m66592->gadget.register_my_device = true;
init_timer(&m66592->timer);
m66592->timer.function = m66592_timer;
u3d->gadget.dev.dma_mask = dev->dev.dma_mask;
u3d->gadget.dev.release = mv_u3d_gadget_release;
u3d->gadget.name = driver_name; /* gadget name */
- u3d->gadget.register_my_device = true;
mv_u3d_eps_init(u3d);
udc->gadget.dev.dma_mask = pdev->dev.dma_mask;
udc->gadget.dev.release = gadget_release;
udc->gadget.name = driver_name; /* gadget name */
- udc->gadget.register_my_device = true;
eps_init(udc);
ret->gadget.dev.dma_mask = dev->dma_mask;
ret->gadget.dev.release = net2272_gadget_release;
ret->gadget.name = driver_name;
- ret->gadget.register_my_device = true;
return ret;
}
dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
dev->gadget.dev.release = gadget_release;
dev->gadget.name = driver_name;
- dev->gadget.register_my_device = true;
/* now all the pci goodies ... */
if (pci_enable_device (pdev) < 0) {
udc->gadget.dev.release = omap_udc_release;
udc->gadget.dev.parent = &odev->dev;
- udc->gadget.register_my_device = true;
if (use_dma)
udc->gadget.dev.dma_mask = odev->dev.dma_mask;
dev->gadget.dev.release = gadget_release;
dev->gadget.name = KBUILD_MODNAME;
dev->gadget.max_speed = USB_SPEED_HIGH;
- dev->gadget.register_my_device = true;
/* Put the device in disconnected state till a driver is bound */
pch_udc_set_disconnect(dev);
dev->gadget.dev.parent = &pdev->dev;
dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
- dev->gadget.register_my_device = true;
the_controller = dev;
platform_set_drvdata(pdev, dev);
udc->gadget.dev.parent = &pdev->dev;
udc->gadget.dev.dma_mask = NULL;
- udc->gadget.register_my_device = true;
udc->vbus_sensed = 0;
the_controller = udc;
r8a66597->gadget.dev.dma_mask = pdev->dev.dma_mask;
r8a66597->gadget.dev.release = pdev->dev.release;
r8a66597->gadget.name = udc_name;
- r8a66597->gadget.register_my_device = true;
init_timer(&r8a66597->timer);
r8a66597->timer.function = r8a66597_timer;
hsotg->gadget.dev.parent = dev;
hsotg->gadget.dev.dma_mask = dev->dma_mask;
hsotg->gadget.dev.release = s3c_hsotg_release;
- hsotg->gadget.register_my_device = true;
/* reset the system */
hsudc->gadget.is_otg = 0;
hsudc->gadget.is_a_peripheral = 0;
hsudc->gadget.speed = USB_SPEED_UNKNOWN;
- hsudc->gadget.register_my_device = true;
s3c_hsudc_setup_ep(hsudc);
udc->gadget.dev.parent = &pdev->dev;
udc->gadget.dev.dma_mask = pdev->dev.dma_mask;
- udc->gadget.register_my_device = true;
the_controller = udc;
platform_set_drvdata(pdev, udc);
if (!udc)
goto err1;
- if (gadget->register_my_device) {
- dev_set_name(&gadget->dev, "gadget");
+ dev_set_name(&gadget->dev, "gadget");
- ret = device_register(&gadget->dev);
- if (ret)
- goto err2;
- }
+ ret = device_register(&gadget->dev);
+ if (ret)
+ goto err2;
device_initialize(&udc->dev);
udc->dev.release = usb_udc_release;
put_device(&udc->dev);
err2:
- if (gadget->register_my_device)
- put_device(&gadget->dev);
+ put_device(&gadget->dev);
+
err1:
return ret;
}
kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE);
device_unregister(&udc->dev);
-
- if (gadget->register_my_device)
- device_unregister(&gadget->dev);
+ device_unregister(&gadget->dev);
}
EXPORT_SYMBOL_GPL(usb_del_gadget_udc);
musb->g.dev.dma_mask = musb->controller->dma_mask;
musb->g.dev.release = musb_gadget_release;
musb->g.name = musb_driver_name;
- musb->g.register_my_device = true;
musb->g.is_otg = 1;
musb_g_init_endpoints(musb);
gpriv->gadget.name = "renesas_usbhs_udc";
gpriv->gadget.ops = &usbhsg_gadget_ops;
gpriv->gadget.max_speed = USB_SPEED_HIGH;
- gpriv->gadget.register_my_device = true;
INIT_LIST_HEAD(&gpriv->gadget.ep_list);
* only supports HNP on a different root port.
* @b_hnp_enable: OTG device feature flag, indicating that the A-Host
* enabled HNP support.
- * @register_my_device: Flag telling udc-core that UDC driver didn't
- * register the gadget device to the driver model. Temporary until
- * all UDC drivers are fixed up properly.
* @name: Identifies the controller hardware type. Used in diagnostics
* and sometimes configuration.
* @dev: Driver model state for this abstract device.
unsigned b_hnp_enable:1;
unsigned a_hnp_support:1;
unsigned a_alt_hnp_support:1;
- unsigned register_my_device:1;
const char *name;
struct device dev;
unsigned out_epnum;