diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/bcm63xx_udc.c | 11 | ||||
-rw-r--r-- | drivers/usb/gadget/configfs.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/f_ecm.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/f_subset.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/f_uac2.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/fusb300_udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/imx_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/m66592-udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa25x_udc.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/s3c2410_udc.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 8 |
16 files changed, 28 insertions, 31 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 83300d94a893..f41aa0d0c414 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -146,7 +146,6 @@ config USB_LPC32XX | |||
146 | depends on ARCH_LPC32XX | 146 | depends on ARCH_LPC32XX |
147 | depends on USB_PHY | 147 | depends on USB_PHY |
148 | select USB_ISP1301 | 148 | select USB_ISP1301 |
149 | select USB_OTG_UTILS | ||
150 | help | 149 | help |
151 | This option selects the USB device controller in the LPC32xx SoC. | 150 | This option selects the USB device controller in the LPC32xx SoC. |
152 | 151 | ||
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f2a970f75bfa..5a5128a226f7 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -1992,8 +1992,6 @@ err_map_regs: | |||
1992 | err_get_hclk: | 1992 | err_get_hclk: |
1993 | clk_put(pclk); | 1993 | clk_put(pclk); |
1994 | 1994 | ||
1995 | platform_set_drvdata(pdev, NULL); | ||
1996 | |||
1997 | return ret; | 1995 | return ret; |
1998 | } | 1996 | } |
1999 | 1997 | ||
diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c index 6e6518264c42..fd24cb4540a4 100644 --- a/drivers/usb/gadget/bcm63xx_udc.c +++ b/drivers/usb/gadget/bcm63xx_udc.c | |||
@@ -2334,21 +2334,11 @@ static int bcm63xx_udc_probe(struct platform_device *pdev) | |||
2334 | } | 2334 | } |
2335 | 2335 | ||
2336 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2336 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2337 | if (!res) { | ||
2338 | dev_err(dev, "error finding USBD resource\n"); | ||
2339 | return -ENXIO; | ||
2340 | } | ||
2341 | |||
2342 | udc->usbd_regs = devm_ioremap_resource(dev, res); | 2337 | udc->usbd_regs = devm_ioremap_resource(dev, res); |
2343 | if (IS_ERR(udc->usbd_regs)) | 2338 | if (IS_ERR(udc->usbd_regs)) |
2344 | return PTR_ERR(udc->usbd_regs); | 2339 | return PTR_ERR(udc->usbd_regs); |
2345 | 2340 | ||
2346 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 2341 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
2347 | if (!res) { | ||
2348 | dev_err(dev, "error finding IUDMA resource\n"); | ||
2349 | return -ENXIO; | ||
2350 | } | ||
2351 | |||
2352 | udc->iudma_regs = devm_ioremap_resource(dev, res); | 2342 | udc->iudma_regs = devm_ioremap_resource(dev, res); |
2353 | if (IS_ERR(udc->iudma_regs)) | 2343 | if (IS_ERR(udc->iudma_regs)) |
2354 | return PTR_ERR(udc->iudma_regs); | 2344 | return PTR_ERR(udc->iudma_regs); |
@@ -2420,7 +2410,6 @@ static int bcm63xx_udc_remove(struct platform_device *pdev) | |||
2420 | usb_del_gadget_udc(&udc->gadget); | 2410 | usb_del_gadget_udc(&udc->gadget); |
2421 | BUG_ON(udc->driver); | 2411 | BUG_ON(udc->driver); |
2422 | 2412 | ||
2423 | platform_set_drvdata(pdev, NULL); | ||
2424 | bcm63xx_uninit_udc_hw(udc); | 2413 | bcm63xx_uninit_udc_hw(udc); |
2425 | 2414 | ||
2426 | return 0; | 2415 | return 0; |
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 3d5cfc9c2c78..80e7f75a56c7 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c | |||
@@ -821,8 +821,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget, | |||
821 | gi->gstrings[i] = NULL; | 821 | gi->gstrings[i] = NULL; |
822 | s = usb_gstrings_attach(&gi->cdev, gi->gstrings, | 822 | s = usb_gstrings_attach(&gi->cdev, gi->gstrings, |
823 | USB_GADGET_FIRST_AVAIL_IDX); | 823 | USB_GADGET_FIRST_AVAIL_IDX); |
824 | if (IS_ERR(s)) | 824 | if (IS_ERR(s)) { |
825 | ret = PTR_ERR(s); | ||
825 | goto err_comp_cleanup; | 826 | goto err_comp_cleanup; |
827 | } | ||
826 | 828 | ||
827 | gi->cdev.desc.iManufacturer = s[USB_GADGET_MANUFACTURER_IDX].id; | 829 | gi->cdev.desc.iManufacturer = s[USB_GADGET_MANUFACTURER_IDX].id; |
828 | gi->cdev.desc.iProduct = s[USB_GADGET_PRODUCT_IDX].id; | 830 | gi->cdev.desc.iProduct = s[USB_GADGET_PRODUCT_IDX].id; |
@@ -847,8 +849,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget, | |||
847 | } | 849 | } |
848 | cfg->gstrings[i] = NULL; | 850 | cfg->gstrings[i] = NULL; |
849 | s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1); | 851 | s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1); |
850 | if (IS_ERR(s)) | 852 | if (IS_ERR(s)) { |
853 | ret = PTR_ERR(s); | ||
851 | goto err_comp_cleanup; | 854 | goto err_comp_cleanup; |
855 | } | ||
852 | c->iConfiguration = s[0].id; | 856 | c->iConfiguration = s[0].id; |
853 | } | 857 | } |
854 | 858 | ||
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index a792e322f4f1..c588e8e486e5 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -1001,7 +1001,6 @@ static int dummy_udc_remove(struct platform_device *pdev) | |||
1001 | struct dummy *dum = platform_get_drvdata(pdev); | 1001 | struct dummy *dum = platform_get_drvdata(pdev); |
1002 | 1002 | ||
1003 | usb_del_gadget_udc(&dum->gadget); | 1003 | usb_del_gadget_udc(&dum->gadget); |
1004 | platform_set_drvdata(pdev, NULL); | ||
1005 | device_remove_file(&dum->gadget.dev, &dev_attr_function); | 1004 | device_remove_file(&dum->gadget.dev, &dev_attr_function); |
1006 | return 0; | 1005 | return 0; |
1007 | } | 1006 | } |
@@ -2661,8 +2660,10 @@ static int __init init(void) | |||
2661 | } | 2660 | } |
2662 | for (i = 0; i < mod_data.num; i++) { | 2661 | for (i = 0; i < mod_data.num; i++) { |
2663 | dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL); | 2662 | dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL); |
2664 | if (!dum[i]) | 2663 | if (!dum[i]) { |
2664 | retval = -ENOMEM; | ||
2665 | goto err_add_pdata; | 2665 | goto err_add_pdata; |
2666 | } | ||
2666 | retval = platform_device_add_data(the_hcd_pdev[i], &dum[i], | 2667 | retval = platform_device_add_data(the_hcd_pdev[i], &dum[i], |
2667 | sizeof(void *)); | 2668 | sizeof(void *)); |
2668 | if (retval) | 2669 | if (retval) |
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index d893d6929079..abf8a31ae146 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c | |||
@@ -816,6 +816,7 @@ ecm_unbind(struct usb_configuration *c, struct usb_function *f) | |||
816 | * @c: the configuration to support the network link | 816 | * @c: the configuration to support the network link |
817 | * @ethaddr: a buffer in which the ethernet address of the host side | 817 | * @ethaddr: a buffer in which the ethernet address of the host side |
818 | * side of the link was recorded | 818 | * side of the link was recorded |
819 | * @dev: eth_dev structure | ||
819 | * Context: single threaded during gadget setup | 820 | * Context: single threaded during gadget setup |
820 | * | 821 | * |
821 | * Returns zero on success, else negative errno. | 822 | * Returns zero on success, else negative errno. |
diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c index 185d6f5e4e4d..7be04b342494 100644 --- a/drivers/usb/gadget/f_subset.c +++ b/drivers/usb/gadget/f_subset.c | |||
@@ -373,6 +373,7 @@ geth_unbind(struct usb_configuration *c, struct usb_function *f) | |||
373 | * @c: the configuration to support the network link | 373 | * @c: the configuration to support the network link |
374 | * @ethaddr: a buffer in which the ethernet address of the host side | 374 | * @ethaddr: a buffer in which the ethernet address of the host side |
375 | * side of the link was recorded | 375 | * side of the link was recorded |
376 | * @dev: eth_dev structure | ||
376 | * Context: single threaded during gadget setup | 377 | * Context: single threaded during gadget setup |
377 | * | 378 | * |
378 | * Returns zero on success, else negative errno. | 379 | * Returns zero on success, else negative errno. |
diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/f_uac2.c index c7468b6c07b0..03c1fb686644 100644 --- a/drivers/usb/gadget/f_uac2.c +++ b/drivers/usb/gadget/f_uac2.c | |||
@@ -456,8 +456,6 @@ static int snd_uac2_remove(struct platform_device *pdev) | |||
456 | { | 456 | { |
457 | struct snd_card *card = platform_get_drvdata(pdev); | 457 | struct snd_card *card = platform_get_drvdata(pdev); |
458 | 458 | ||
459 | platform_set_drvdata(pdev, NULL); | ||
460 | |||
461 | if (card) | 459 | if (card) |
462 | return snd_card_free(card); | 460 | return snd_card_free(card); |
463 | 461 | ||
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c index cec8871b77f9..b8632d40f8bf 100644 --- a/drivers/usb/gadget/fusb300_udc.c +++ b/drivers/usb/gadget/fusb300_udc.c | |||
@@ -1461,8 +1461,10 @@ static int __init fusb300_probe(struct platform_device *pdev) | |||
1461 | 1461 | ||
1462 | fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep, | 1462 | fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep, |
1463 | GFP_KERNEL); | 1463 | GFP_KERNEL); |
1464 | if (fusb300->ep0_req == NULL) | 1464 | if (fusb300->ep0_req == NULL) { |
1465 | ret = -ENOMEM; | ||
1465 | goto clean_up3; | 1466 | goto clean_up3; |
1467 | } | ||
1466 | 1468 | ||
1467 | init_controller(fusb300); | 1469 | init_controller(fusb300); |
1468 | ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget); | 1470 | ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget); |
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index b5cebd6b0d7a..9b2d24e4c95f 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -1511,8 +1511,6 @@ static int __exit imx_udc_remove(struct platform_device *pdev) | |||
1511 | if (pdata->exit) | 1511 | if (pdata->exit) |
1512 | pdata->exit(&pdev->dev); | 1512 | pdata->exit(&pdev->dev); |
1513 | 1513 | ||
1514 | platform_set_drvdata(pdev, NULL); | ||
1515 | |||
1516 | return 0; | 1514 | return 0; |
1517 | } | 1515 | } |
1518 | 1516 | ||
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 866ef0999247..51cfe72da5bb 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -1660,8 +1660,10 @@ static int __init m66592_probe(struct platform_device *pdev) | |||
1660 | m66592->epaddr2ep[0] = &m66592->ep[0]; | 1660 | m66592->epaddr2ep[0] = &m66592->ep[0]; |
1661 | 1661 | ||
1662 | m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL); | 1662 | m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL); |
1663 | if (m66592->ep0_req == NULL) | 1663 | if (m66592->ep0_req == NULL) { |
1664 | ret = -ENOMEM; | ||
1664 | goto clean_up3; | 1665 | goto clean_up3; |
1666 | } | ||
1665 | m66592->ep0_req->complete = nop_completion; | 1667 | m66592->ep0_req->complete = nop_completion; |
1666 | 1668 | ||
1667 | init_controller(m66592); | 1669 | init_controller(m66592); |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index ef47495dec8f..95c531d5aa4f 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2236,7 +2236,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev) | |||
2236 | dev->transceiver = NULL; | 2236 | dev->transceiver = NULL; |
2237 | } | 2237 | } |
2238 | 2238 | ||
2239 | platform_set_drvdata(pdev, NULL); | ||
2240 | the_controller = NULL; | 2239 | the_controller = NULL; |
2241 | return 0; | 2240 | return 0; |
2242 | } | 2241 | } |
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 0b742d171843..7ff7d9cf2061 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -1977,8 +1977,10 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
1977 | 1977 | ||
1978 | r8a66597->ep0_req = r8a66597_alloc_request(&r8a66597->ep[0].ep, | 1978 | r8a66597->ep0_req = r8a66597_alloc_request(&r8a66597->ep[0].ep, |
1979 | GFP_KERNEL); | 1979 | GFP_KERNEL); |
1980 | if (r8a66597->ep0_req == NULL) | 1980 | if (r8a66597->ep0_req == NULL) { |
1981 | ret = -ENOMEM; | ||
1981 | goto clean_up3; | 1982 | goto clean_up3; |
1983 | } | ||
1982 | r8a66597->ep0_req->complete = nop_completion; | 1984 | r8a66597->ep0_req->complete = nop_completion; |
1983 | 1985 | ||
1984 | ret = usb_add_gadget_udc(&pdev->dev, &r8a66597->gadget); | 1986 | ret = usb_add_gadget_udc(&pdev->dev, &r8a66597->gadget); |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index a3cdc32115d5..af22f24046b2 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -437,7 +437,7 @@ static void s3c_hsotg_unmap_dma(struct s3c_hsotg *hsotg, | |||
437 | if (hs_req->req.length == 0) | 437 | if (hs_req->req.length == 0) |
438 | return; | 438 | return; |
439 | 439 | ||
440 | usb_gadget_unmap_request(&hsotg->gadget, hs_req, hs_ep->dir_in); | 440 | usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); |
441 | } | 441 | } |
442 | 442 | ||
443 | /** | 443 | /** |
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index d0e75e1b3ccb..09c4f70c93c4 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev) | |||
1851 | irq = gpio_to_irq(udc_info->vbus_pin); | 1851 | irq = gpio_to_irq(udc_info->vbus_pin); |
1852 | if (irq < 0) { | 1852 | if (irq < 0) { |
1853 | dev_err(dev, "no irq for gpio vbus pin\n"); | 1853 | dev_err(dev, "no irq for gpio vbus pin\n"); |
1854 | retval = irq; | ||
1854 | goto err_gpio_claim; | 1855 | goto err_gpio_claim; |
1855 | } | 1856 | } |
1856 | 1857 | ||
@@ -1948,8 +1949,6 @@ static int s3c2410_udc_remove(struct platform_device *pdev) | |||
1948 | iounmap(base_addr); | 1949 | iounmap(base_addr); |
1949 | release_mem_region(rsrc_start, rsrc_len); | 1950 | release_mem_region(rsrc_start, rsrc_len); |
1950 | 1951 | ||
1951 | platform_set_drvdata(pdev, NULL); | ||
1952 | |||
1953 | if (!IS_ERR(udc_clock) && udc_clock != NULL) { | 1952 | if (!IS_ERR(udc_clock) && udc_clock != NULL) { |
1954 | clk_disable(udc_clock); | 1953 | clk_disable(udc_clock); |
1955 | clk_put(udc_clock); | 1954 | clk_put(udc_clock); |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 2cd6262e8b71..0deb9d6cde26 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -284,12 +284,16 @@ static int __init zero_bind(struct usb_composite_dev *cdev) | |||
284 | ss_opts->bulk_buflen = gzero_options.bulk_buflen; | 284 | ss_opts->bulk_buflen = gzero_options.bulk_buflen; |
285 | 285 | ||
286 | func_ss = usb_get_function(func_inst_ss); | 286 | func_ss = usb_get_function(func_inst_ss); |
287 | if (IS_ERR(func_ss)) | 287 | if (IS_ERR(func_ss)) { |
288 | status = PTR_ERR(func_ss); | ||
288 | goto err_put_func_inst_ss; | 289 | goto err_put_func_inst_ss; |
290 | } | ||
289 | 291 | ||
290 | func_inst_lb = usb_get_function_instance("Loopback"); | 292 | func_inst_lb = usb_get_function_instance("Loopback"); |
291 | if (IS_ERR(func_inst_lb)) | 293 | if (IS_ERR(func_inst_lb)) { |
294 | status = PTR_ERR(func_inst_lb); | ||
292 | goto err_put_func_ss; | 295 | goto err_put_func_ss; |
296 | } | ||
293 | 297 | ||
294 | lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst); | 298 | lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst); |
295 | lb_opts->bulk_buflen = gzero_options.bulk_buflen; | 299 | lb_opts->bulk_buflen = gzero_options.bulk_buflen; |