diff options
Diffstat (limited to 'drivers/usb')
29 files changed, 7 insertions, 39 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index e95e8bbde988..1b65ac8f3c9b 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1721,7 +1721,6 @@ static int udc_start(struct ci13xxx *ci) | |||
1721 | ci->gadget.dev.coherent_dma_mask = dev->coherent_dma_mask; | 1721 | ci->gadget.dev.coherent_dma_mask = dev->coherent_dma_mask; |
1722 | ci->gadget.dev.parent = dev; | 1722 | ci->gadget.dev.parent = dev; |
1723 | ci->gadget.dev.release = udc_release; | 1723 | ci->gadget.dev.release = udc_release; |
1724 | ci->gadget.register_my_device = true; | ||
1725 | 1724 | ||
1726 | /* alloc resources */ | 1725 | /* alloc resources */ |
1727 | ci->qh_pool = dma_pool_create("ci13xxx_qh", dev, | 1726 | ci->qh_pool = dma_pool_create("ci13xxx_qh", dev, |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 10bb161eec88..65493b6cd5a6 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -2499,7 +2499,6 @@ int dwc3_gadget_init(struct dwc3 *dwc) | |||
2499 | dwc->gadget.dev.dma_parms = dwc->dev->dma_parms; | 2499 | dwc->gadget.dev.dma_parms = dwc->dev->dma_parms; |
2500 | dwc->gadget.dev.dma_mask = dwc->dev->dma_mask; | 2500 | dwc->gadget.dev.dma_mask = dwc->dev->dma_mask; |
2501 | dwc->gadget.dev.release = dwc3_gadget_release; | 2501 | dwc->gadget.dev.release = dwc3_gadget_release; |
2502 | dwc->gadget.register_my_device = true; | ||
2503 | dwc->gadget.name = "dwc3-gadget"; | 2502 | dwc->gadget.name = "dwc3-gadget"; |
2504 | 2503 | ||
2505 | /* | 2504 | /* |
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index eee01ea70f8c..eec4461fb45f 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
@@ -3275,7 +3275,6 @@ static int udc_probe(struct udc *dev) | |||
3275 | dev->gadget.dev.release = gadget_release; | 3275 | dev->gadget.dev.release = gadget_release; |
3276 | dev->gadget.name = name; | 3276 | dev->gadget.name = name; |
3277 | dev->gadget.max_speed = USB_SPEED_HIGH; | 3277 | dev->gadget.max_speed = USB_SPEED_HIGH; |
3278 | dev->gadget.register_my_device = true; | ||
3279 | 3278 | ||
3280 | /* init registers, interrupts, ... */ | 3279 | /* init registers, interrupts, ... */ |
3281 | startup_registers(dev); | 3280 | startup_registers(dev); |
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 47b7e58f8415..9936de9bbe50 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -1726,7 +1726,6 @@ static int at91udc_probe(struct platform_device *pdev) | |||
1726 | 1726 | ||
1727 | /* init software state */ | 1727 | /* init software state */ |
1728 | udc = &controller; | 1728 | udc = &controller; |
1729 | udc->gadget.register_my_device = true; | ||
1730 | udc->gadget.dev.parent = dev; | 1729 | udc->gadget.dev.parent = dev; |
1731 | if (pdev->dev.of_node) | 1730 | if (pdev->dev.of_node) |
1732 | at91udc_of_init(udc, pdev->dev.of_node); | 1731 | at91udc_of_init(udc, pdev->dev.of_node); |
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 2404d0c25668..41518e612808 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -1902,7 +1902,6 @@ static int __init usba_udc_probe(struct platform_device *pdev) | |||
1902 | 1902 | ||
1903 | udc->gadget.dev.parent = &pdev->dev; | 1903 | udc->gadget.dev.parent = &pdev->dev; |
1904 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1904 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1905 | udc->gadget.register_my_device = true; | ||
1906 | 1905 | ||
1907 | platform_set_drvdata(pdev, udc); | 1906 | platform_set_drvdata(pdev, udc); |
1908 | 1907 | ||
diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c index c020b877219d..d4f73e1b37e6 100644 --- a/drivers/usb/gadget/bcm63xx_udc.c +++ b/drivers/usb/gadget/bcm63xx_udc.c | |||
@@ -2374,7 +2374,6 @@ static int bcm63xx_udc_probe(struct platform_device *pdev) | |||
2374 | udc->gadget.dev.parent = dev; | 2374 | udc->gadget.dev.parent = dev; |
2375 | udc->gadget.dev.release = bcm63xx_udc_gadget_release; | 2375 | udc->gadget.dev.release = bcm63xx_udc_gadget_release; |
2376 | udc->gadget.dev.dma_mask = dev->dma_mask; | 2376 | udc->gadget.dev.dma_mask = dev->dma_mask; |
2377 | udc->gadget.register_my_device = true; | ||
2378 | 2377 | ||
2379 | if (!pd->use_fullspeed && !use_fullspeed) | 2378 | if (!pd->use_fullspeed && !use_fullspeed) |
2380 | udc->gadget.max_speed = USB_SPEED_HIGH; | 2379 | udc->gadget.max_speed = USB_SPEED_HIGH; |
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index a6950aa8f3be..c4f27d5a2b9c 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -983,7 +983,6 @@ static int dummy_udc_probe(struct platform_device *pdev) | |||
983 | dum->gadget.name = gadget_name; | 983 | dum->gadget.name = gadget_name; |
984 | dum->gadget.ops = &dummy_ops; | 984 | dum->gadget.ops = &dummy_ops; |
985 | dum->gadget.max_speed = USB_SPEED_SUPER; | 985 | dum->gadget.max_speed = USB_SPEED_SUPER; |
986 | dum->gadget.register_my_device = true; | ||
987 | 986 | ||
988 | dum->gadget.dev.parent = &pdev->dev; | 987 | dum->gadget.dev.parent = &pdev->dev; |
989 | dum->gadget.dev.release = dummy_gadget_release; | 988 | dum->gadget.dev.release = dummy_gadget_release; |
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index 0f78cd859d68..0e7531bd33f4 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
@@ -2525,7 +2525,6 @@ static int qe_udc_probe(struct platform_device *ofdev) | |||
2525 | udc->gadget.name = driver_name; | 2525 | udc->gadget.name = driver_name; |
2526 | udc->gadget.dev.release = qe_udc_release; | 2526 | udc->gadget.dev.release = qe_udc_release; |
2527 | udc->gadget.dev.parent = &ofdev->dev; | 2527 | udc->gadget.dev.parent = &ofdev->dev; |
2528 | udc->gadget.register_my_device = true; | ||
2529 | 2528 | ||
2530 | /* initialize qe_ep struct */ | 2529 | /* initialize qe_ep struct */ |
2531 | for (i = 0; i < USB_MAX_ENDPOINTS ; i++) { | 2530 | for (i = 0; i < USB_MAX_ENDPOINTS ; i++) { |
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 9140a2daad87..f33b9005eeac 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c | |||
@@ -2524,7 +2524,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
2524 | udc_controller->gadget.dev.release = fsl_udc_release; | 2524 | udc_controller->gadget.dev.release = fsl_udc_release; |
2525 | udc_controller->gadget.dev.parent = &pdev->dev; | 2525 | udc_controller->gadget.dev.parent = &pdev->dev; |
2526 | udc_controller->gadget.dev.of_node = pdev->dev.of_node; | 2526 | udc_controller->gadget.dev.of_node = pdev->dev.of_node; |
2527 | udc_controller->gadget.register_my_device = true; | ||
2528 | 2527 | ||
2529 | if (!IS_ERR_OR_NULL(udc_controller->transceiver)) | 2528 | if (!IS_ERR_OR_NULL(udc_controller->transceiver)) |
2530 | udc_controller->gadget.is_otg = 1; | 2529 | udc_controller->gadget.is_otg = 1; |
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c index d29017218b01..2d3c8b351f42 100644 --- a/drivers/usb/gadget/fusb300_udc.c +++ b/drivers/usb/gadget/fusb300_udc.c | |||
@@ -1427,7 +1427,6 @@ static int __init fusb300_probe(struct platform_device *pdev) | |||
1427 | fusb300->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1427 | fusb300->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1428 | fusb300->gadget.dev.release = pdev->dev.release; | 1428 | fusb300->gadget.dev.release = pdev->dev.release; |
1429 | fusb300->gadget.name = udc_name; | 1429 | fusb300->gadget.name = udc_name; |
1430 | fusb300->gadget.register_my_device = true; | ||
1431 | fusb300->reg = reg; | 1430 | fusb300->reg = reg; |
1432 | 1431 | ||
1433 | ret = request_irq(ires->start, fusb300_irq, IRQF_SHARED, | 1432 | ret = request_irq(ires->start, fusb300_irq, IRQF_SHARED, |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index b4ea2cf465a6..8a6c66618bd3 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -1758,7 +1758,6 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1758 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1758 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1759 | dev->gadget.dev.release = gadget_release; | 1759 | dev->gadget.dev.release = gadget_release; |
1760 | dev->gadget.name = driver_name; | 1760 | dev->gadget.name = driver_name; |
1761 | dev->gadget.register_my_device = true; | ||
1762 | 1761 | ||
1763 | /* now all the pci goodies ... */ | 1762 | /* now all the pci goodies ... */ |
1764 | retval = pci_enable_device(pdev); | 1763 | retval = pci_enable_device(pdev); |
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 435b20346ead..9c5b7451a7d1 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -1461,7 +1461,6 @@ static int __init imx_udc_probe(struct platform_device *pdev) | |||
1461 | imx_usb->clk = clk; | 1461 | imx_usb->clk = clk; |
1462 | imx_usb->dev = &pdev->dev; | 1462 | imx_usb->dev = &pdev->dev; |
1463 | 1463 | ||
1464 | imx_usb->gadget.register_my_device = true; | ||
1465 | imx_usb->gadget.dev.parent = &pdev->dev; | 1464 | imx_usb->gadget.dev.parent = &pdev->dev; |
1466 | imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1465 | imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1467 | 1466 | ||
diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c index 329e1c5f0ef9..67c3ef9d9bed 100644 --- a/drivers/usb/gadget/lpc32xx_udc.c +++ b/drivers/usb/gadget/lpc32xx_udc.c | |||
@@ -3090,7 +3090,6 @@ static int __init lpc32xx_udc_probe(struct platform_device *pdev) | |||
3090 | 3090 | ||
3091 | /* init software state */ | 3091 | /* init software state */ |
3092 | udc->gadget.dev.parent = dev; | 3092 | udc->gadget.dev.parent = dev; |
3093 | udc->gadget.register_my_device = true; | ||
3094 | udc->pdev = pdev; | 3093 | udc->pdev = pdev; |
3095 | udc->dev = &pdev->dev; | 3094 | udc->dev = &pdev->dev; |
3096 | udc->enabled = 0; | 3095 | udc->enabled = 0; |
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 43ad70dff74d..eb61d0b54f21 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -1612,7 +1612,6 @@ static int __init m66592_probe(struct platform_device *pdev) | |||
1612 | m66592->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1612 | m66592->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1613 | m66592->gadget.dev.release = pdev->dev.release; | 1613 | m66592->gadget.dev.release = pdev->dev.release; |
1614 | m66592->gadget.name = udc_name; | 1614 | m66592->gadget.name = udc_name; |
1615 | m66592->gadget.register_my_device = true; | ||
1616 | 1615 | ||
1617 | init_timer(&m66592->timer); | 1616 | init_timer(&m66592->timer); |
1618 | m66592->timer.function = m66592_timer; | 1617 | m66592->timer.function = m66592_timer; |
diff --git a/drivers/usb/gadget/mv_u3d_core.c b/drivers/usb/gadget/mv_u3d_core.c index 734ade11505f..e5735fc610de 100644 --- a/drivers/usb/gadget/mv_u3d_core.c +++ b/drivers/usb/gadget/mv_u3d_core.c | |||
@@ -1959,7 +1959,6 @@ static int mv_u3d_probe(struct platform_device *dev) | |||
1959 | u3d->gadget.dev.dma_mask = dev->dev.dma_mask; | 1959 | u3d->gadget.dev.dma_mask = dev->dev.dma_mask; |
1960 | u3d->gadget.dev.release = mv_u3d_gadget_release; | 1960 | u3d->gadget.dev.release = mv_u3d_gadget_release; |
1961 | u3d->gadget.name = driver_name; /* gadget name */ | 1961 | u3d->gadget.name = driver_name; /* gadget name */ |
1962 | u3d->gadget.register_my_device = true; | ||
1963 | 1962 | ||
1964 | mv_u3d_eps_init(u3d); | 1963 | mv_u3d_eps_init(u3d); |
1965 | 1964 | ||
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index a7afdfb413b3..be35573f8703 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
@@ -2313,7 +2313,6 @@ static int mv_udc_probe(struct platform_device *pdev) | |||
2313 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; | 2313 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; |
2314 | udc->gadget.dev.release = gadget_release; | 2314 | udc->gadget.dev.release = gadget_release; |
2315 | udc->gadget.name = driver_name; /* gadget name */ | 2315 | udc->gadget.name = driver_name; /* gadget name */ |
2316 | udc->gadget.register_my_device = true; | ||
2317 | 2316 | ||
2318 | eps_init(udc); | 2317 | eps_init(udc); |
2319 | 2318 | ||
diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c index 635248f42dcd..78c8bb538332 100644 --- a/drivers/usb/gadget/net2272.c +++ b/drivers/usb/gadget/net2272.c | |||
@@ -2239,7 +2239,6 @@ static struct net2272 *net2272_probe_init(struct device *dev, unsigned int irq) | |||
2239 | ret->gadget.dev.dma_mask = dev->dma_mask; | 2239 | ret->gadget.dev.dma_mask = dev->dma_mask; |
2240 | ret->gadget.dev.release = net2272_gadget_release; | 2240 | ret->gadget.dev.release = net2272_gadget_release; |
2241 | ret->gadget.name = driver_name; | 2241 | ret->gadget.name = driver_name; |
2242 | ret->gadget.register_my_device = true; | ||
2243 | 2242 | ||
2244 | return ret; | 2243 | return ret; |
2245 | } | 2244 | } |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index c55af4293509..2089d9b0058c 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -2714,7 +2714,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2714 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 2714 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
2715 | dev->gadget.dev.release = gadget_release; | 2715 | dev->gadget.dev.release = gadget_release; |
2716 | dev->gadget.name = driver_name; | 2716 | dev->gadget.name = driver_name; |
2717 | dev->gadget.register_my_device = true; | ||
2718 | 2717 | ||
2719 | /* now all the pci goodies ... */ | 2718 | /* now all the pci goodies ... */ |
2720 | if (pci_enable_device (pdev) < 0) { | 2719 | if (pci_enable_device (pdev) < 0) { |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index c979272e7c86..b23c861e2a97 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2634,7 +2634,6 @@ omap_udc_setup(struct platform_device *odev, struct usb_phy *xceiv) | |||
2634 | 2634 | ||
2635 | udc->gadget.dev.release = omap_udc_release; | 2635 | udc->gadget.dev.release = omap_udc_release; |
2636 | udc->gadget.dev.parent = &odev->dev; | 2636 | udc->gadget.dev.parent = &odev->dev; |
2637 | udc->gadget.register_my_device = true; | ||
2638 | if (use_dma) | 2637 | if (use_dma) |
2639 | udc->gadget.dev.dma_mask = odev->dev.dma_mask; | 2638 | udc->gadget.dev.dma_mask = odev->dev.dma_mask; |
2640 | 2639 | ||
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c index 703214543dd4..e8c9afd8fbf0 100644 --- a/drivers/usb/gadget/pch_udc.c +++ b/drivers/usb/gadget/pch_udc.c | |||
@@ -3198,7 +3198,6 @@ static int pch_udc_probe(struct pci_dev *pdev, | |||
3198 | dev->gadget.dev.release = gadget_release; | 3198 | dev->gadget.dev.release = gadget_release; |
3199 | dev->gadget.name = KBUILD_MODNAME; | 3199 | dev->gadget.name = KBUILD_MODNAME; |
3200 | dev->gadget.max_speed = USB_SPEED_HIGH; | 3200 | dev->gadget.max_speed = USB_SPEED_HIGH; |
3201 | dev->gadget.register_my_device = true; | ||
3202 | 3201 | ||
3203 | /* Put the device in disconnected state till a driver is bound */ | 3202 | /* Put the device in disconnected state till a driver is bound */ |
3204 | pch_udc_set_disconnect(dev); | 3203 | pch_udc_set_disconnect(dev); |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 8996fcb053ef..e29bb878b2d7 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2140,7 +2140,6 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
2140 | 2140 | ||
2141 | dev->gadget.dev.parent = &pdev->dev; | 2141 | dev->gadget.dev.parent = &pdev->dev; |
2142 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 2142 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
2143 | dev->gadget.register_my_device = true; | ||
2144 | 2143 | ||
2145 | the_controller = dev; | 2144 | the_controller = dev; |
2146 | platform_set_drvdata(pdev, dev); | 2145 | platform_set_drvdata(pdev, dev); |
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 1c5bfaafa6c8..07ce1477f911 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2457,7 +2457,6 @@ static int __init pxa_udc_probe(struct platform_device *pdev) | |||
2457 | 2457 | ||
2458 | udc->gadget.dev.parent = &pdev->dev; | 2458 | udc->gadget.dev.parent = &pdev->dev; |
2459 | udc->gadget.dev.dma_mask = NULL; | 2459 | udc->gadget.dev.dma_mask = NULL; |
2460 | udc->gadget.register_my_device = true; | ||
2461 | udc->vbus_sensed = 0; | 2460 | udc->vbus_sensed = 0; |
2462 | 2461 | ||
2463 | the_controller = udc; | 2462 | the_controller = udc; |
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index ae94c0eaf633..a67d47708b98 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -1919,7 +1919,6 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
1919 | r8a66597->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1919 | r8a66597->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1920 | r8a66597->gadget.dev.release = pdev->dev.release; | 1920 | r8a66597->gadget.dev.release = pdev->dev.release; |
1921 | r8a66597->gadget.name = udc_name; | 1921 | r8a66597->gadget.name = udc_name; |
1922 | r8a66597->gadget.register_my_device = true; | ||
1923 | 1922 | ||
1924 | init_timer(&r8a66597->timer); | 1923 | init_timer(&r8a66597->timer); |
1925 | r8a66597->timer.function = r8a66597_timer; | 1924 | r8a66597->timer.function = r8a66597_timer; |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 5fbd233eb6a0..8ae0bd99ffde 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -3573,7 +3573,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3573 | hsotg->gadget.dev.parent = dev; | 3573 | hsotg->gadget.dev.parent = dev; |
3574 | hsotg->gadget.dev.dma_mask = dev->dma_mask; | 3574 | hsotg->gadget.dev.dma_mask = dev->dma_mask; |
3575 | hsotg->gadget.dev.release = s3c_hsotg_release; | 3575 | hsotg->gadget.dev.release = s3c_hsotg_release; |
3576 | hsotg->gadget.register_my_device = true; | ||
3577 | 3576 | ||
3578 | /* reset the system */ | 3577 | /* reset the system */ |
3579 | 3578 | ||
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index c4ff747f53fc..7fc3de537c9a 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c | |||
@@ -1312,7 +1312,6 @@ static int s3c_hsudc_probe(struct platform_device *pdev) | |||
1312 | hsudc->gadget.is_otg = 0; | 1312 | hsudc->gadget.is_otg = 0; |
1313 | hsudc->gadget.is_a_peripheral = 0; | 1313 | hsudc->gadget.is_a_peripheral = 0; |
1314 | hsudc->gadget.speed = USB_SPEED_UNKNOWN; | 1314 | hsudc->gadget.speed = USB_SPEED_UNKNOWN; |
1315 | hsudc->gadget.register_my_device = true; | ||
1316 | 1315 | ||
1317 | s3c_hsudc_setup_ep(hsudc); | 1316 | s3c_hsudc_setup_ep(hsudc); |
1318 | 1317 | ||
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index c4134948dd9e..a669081bbb88 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -1826,7 +1826,6 @@ static int s3c2410_udc_probe(struct platform_device *pdev) | |||
1826 | 1826 | ||
1827 | udc->gadget.dev.parent = &pdev->dev; | 1827 | udc->gadget.dev.parent = &pdev->dev; |
1828 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1828 | udc->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1829 | udc->gadget.register_my_device = true; | ||
1830 | 1829 | ||
1831 | the_controller = udc; | 1830 | the_controller = udc; |
1832 | platform_set_drvdata(pdev, udc); | 1831 | platform_set_drvdata(pdev, udc); |
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 919505426ec1..40b1d888d5a1 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c | |||
@@ -173,13 +173,11 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget) | |||
173 | if (!udc) | 173 | if (!udc) |
174 | goto err1; | 174 | goto err1; |
175 | 175 | ||
176 | if (gadget->register_my_device) { | 176 | dev_set_name(&gadget->dev, "gadget"); |
177 | dev_set_name(&gadget->dev, "gadget"); | ||
178 | 177 | ||
179 | ret = device_register(&gadget->dev); | 178 | ret = device_register(&gadget->dev); |
180 | if (ret) | 179 | if (ret) |
181 | goto err2; | 180 | goto err2; |
182 | } | ||
183 | 181 | ||
184 | device_initialize(&udc->dev); | 182 | device_initialize(&udc->dev); |
185 | udc->dev.release = usb_udc_release; | 183 | udc->dev.release = usb_udc_release; |
@@ -211,8 +209,8 @@ err3: | |||
211 | put_device(&udc->dev); | 209 | put_device(&udc->dev); |
212 | 210 | ||
213 | err2: | 211 | err2: |
214 | if (gadget->register_my_device) | 212 | put_device(&gadget->dev); |
215 | put_device(&gadget->dev); | 213 | |
216 | err1: | 214 | err1: |
217 | return ret; | 215 | return ret; |
218 | } | 216 | } |
@@ -266,9 +264,7 @@ found: | |||
266 | 264 | ||
267 | kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE); | 265 | kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE); |
268 | device_unregister(&udc->dev); | 266 | device_unregister(&udc->dev); |
269 | 267 | device_unregister(&gadget->dev); | |
270 | if (gadget->register_my_device) | ||
271 | device_unregister(&gadget->dev); | ||
272 | } | 268 | } |
273 | EXPORT_SYMBOL_GPL(usb_del_gadget_udc); | 269 | EXPORT_SYMBOL_GPL(usb_del_gadget_udc); |
274 | 270 | ||
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index cadb750921e9..e363033f6754 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1891,7 +1891,6 @@ int musb_gadget_setup(struct musb *musb) | |||
1891 | musb->g.dev.dma_mask = musb->controller->dma_mask; | 1891 | musb->g.dev.dma_mask = musb->controller->dma_mask; |
1892 | musb->g.dev.release = musb_gadget_release; | 1892 | musb->g.dev.release = musb_gadget_release; |
1893 | musb->g.name = musb_driver_name; | 1893 | musb->g.name = musb_driver_name; |
1894 | musb->g.register_my_device = true; | ||
1895 | musb->g.is_otg = 1; | 1894 | musb->g.is_otg = 1; |
1896 | 1895 | ||
1897 | musb_g_init_endpoints(musb); | 1896 | musb_g_init_endpoints(musb); |
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 5d5fab0ad0d1..6a3afa9b764c 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -981,7 +981,6 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) | |||
981 | gpriv->gadget.name = "renesas_usbhs_udc"; | 981 | gpriv->gadget.name = "renesas_usbhs_udc"; |
982 | gpriv->gadget.ops = &usbhsg_gadget_ops; | 982 | gpriv->gadget.ops = &usbhsg_gadget_ops; |
983 | gpriv->gadget.max_speed = USB_SPEED_HIGH; | 983 | gpriv->gadget.max_speed = USB_SPEED_HIGH; |
984 | gpriv->gadget.register_my_device = true; | ||
985 | 984 | ||
986 | INIT_LIST_HEAD(&gpriv->gadget.ep_list); | 985 | INIT_LIST_HEAD(&gpriv->gadget.ep_list); |
987 | 986 | ||