usb: fixes for v3.10-rc2

Here's the initial set of fixes for v3.10-rc series. It countains miscellaneous
 fixes in numerous drivers.
 
 Many gadget drivers and PHY drivers learned that it's not necessary to
 platform_set_drvdata() twice, that's not necessary to check the resource
 pointer returned by platform_get_resource() when using devm_ioremap_resource()
 and they learned that we shouldn't return 0 in case of errors.
 
 DWC3 got a build fix for cases where DWC3 is marked as 'y' while gadget API is
 marked as 'm'.
 
 There's also a NULL pointer exception fix on usb_get_phy(), mxs-phy now knows
 which PHY type it is and s3c-hsotg is now passing proper arguments to
 usb_gadget_unmap_request().
 
 Other than that there are some spelling fixes and kernel-doc warnings.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRk6TAAAoJEIaOsuA1yqRElRAP/2qqRq9WLzHSJgb2y0GJf+KO
 bLtulVvb/AuNyQ4kpuNoFeG97HCVOG4QZTP0ZyXqwurbMcyPrcNyIbVNzdSL7KhK
 bzUDOOXOyVWZsBvc/Dxl1Fbhazovn+mhTF30ne8Bd+OviSCheMLM74fjhjLnQQtY
 tPBFiRqH4fFLwWoJQ6FAeZGzM+6Es31QGStGZgGRSD7S3aypdZzzdaHnsFNJOK32
 1NZIDcV6dzKQ+w/GP3WkaMb06hvttM40sNZUS0Vrb2r5YY5ZPrCPA2NEbJ0yw/W9
 cQum2U/qJfDpNIHmLdaZfLY7vNbeQ+32zyCU7Y7kJeaz1zUSJ6V4KT7N4TWliqE2
 w/n1hEkJP2EpbHQ5kx+RdTLifYdmWGMZhVj5GGGQdRuL8oE2ngrVceQoMzYehOr7
 EfB2l+eSCK1Ao4rPFyomeUcclyJ7/vC/5IrFbN5wzWx58azqa4P9ECTHf5Zdrknm
 0YcLBZarZ+auNiLdX3+DvhCnzAtC03BrOcuzE2McY9FqGnpqL/ruNKIbpF8ZIuzP
 2NSHPp7oF+PWRFsi/Ucq4qr5acqBZOgnDSSC2JyXq1xhO0KB+ak628Y3PC2ZERWz
 AYRcbRRsyjajfbdxK0dN6Dm3bWbkAxrUA4eEhEgdGuifKu0cDxQsigmTEzEZKvet
 Xk/e6m1UGmqHjtwP33RJ
 =PuBf
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.10-rc2

Here's the initial set of fixes for v3.10-rc series. It countains miscellaneous
fixes in numerous drivers.

Many gadget drivers and PHY drivers learned that it's not necessary to
platform_set_drvdata() twice, that's not necessary to check the resource
pointer returned by platform_get_resource() when using devm_ioremap_resource()
and they learned that we shouldn't return 0 in case of errors.

DWC3 got a build fix for cases where DWC3 is marked as 'y' while gadget API is
marked as 'm'.

There's also a NULL pointer exception fix on usb_get_phy(), mxs-phy now knows
which PHY type it is and s3c-hsotg is now passing proper arguments to
usb_gadget_unmap_request().

Other than that there are some spelling fixes and kernel-doc warnings.

Signed-of-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Greg Kroah-Hartman 2013-05-15 12:52:04 -04:00
commit 4089ffd766
32 changed files with 40 additions and 71 deletions

View file

@ -2,7 +2,6 @@ config USB_DWC2
tristate "DesignWare USB2 DRD Core Support" tristate "DesignWare USB2 DRD Core Support"
depends on USB depends on USB
depends on VIRT_TO_BUS depends on VIRT_TO_BUS
select USB_OTG_UTILS
help help
Say Y or M here if your system has a Dual Role HighSpeed Say Y or M here if your system has a Dual Role HighSpeed
USB controller based on the DesignWare HSOTG IP Core. USB controller based on the DesignWare HSOTG IP Core.

View file

@ -19,21 +19,21 @@ choice
config USB_DWC3_HOST config USB_DWC3_HOST
bool "Host only mode" bool "Host only mode"
depends on USB depends on USB=y || USB=USB_DWC3
help help
Select this when you want to use DWC3 in host mode only, Select this when you want to use DWC3 in host mode only,
thereby the gadget feature will be regressed. thereby the gadget feature will be regressed.
config USB_DWC3_GADGET config USB_DWC3_GADGET
bool "Gadget only mode" bool "Gadget only mode"
depends on USB_GADGET depends on USB_GADGET=y || USB_GADGET=USB_DWC3
help help
Select this when you want to use DWC3 in gadget mode only, Select this when you want to use DWC3 in gadget mode only,
thereby the host feature will be regressed. thereby the host feature will be regressed.
config USB_DWC3_DUAL_ROLE config USB_DWC3_DUAL_ROLE
bool "Dual Role mode" bool "Dual Role mode"
depends on (USB && USB_GADGET) depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
help help
This is the default mode of working of DWC3 controller where This is the default mode of working of DWC3 controller where
both host and gadget features are enabled. both host and gadget features are enabled.

View file

@ -146,7 +146,6 @@ config USB_LPC32XX
depends on ARCH_LPC32XX depends on ARCH_LPC32XX
depends on USB_PHY depends on USB_PHY
select USB_ISP1301 select USB_ISP1301
select USB_OTG_UTILS
help help
This option selects the USB device controller in the LPC32xx SoC. This option selects the USB device controller in the LPC32xx SoC.

View file

@ -1992,8 +1992,6 @@ err_map_regs:
err_get_hclk: err_get_hclk:
clk_put(pclk); clk_put(pclk);
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }

View file

@ -2334,21 +2334,11 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "error finding USBD resource\n");
return -ENXIO;
}
udc->usbd_regs = devm_ioremap_resource(dev, res); udc->usbd_regs = devm_ioremap_resource(dev, res);
if (IS_ERR(udc->usbd_regs)) if (IS_ERR(udc->usbd_regs))
return PTR_ERR(udc->usbd_regs); return PTR_ERR(udc->usbd_regs);
res = platform_get_resource(pdev, IORESOURCE_MEM, 1); res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res) {
dev_err(dev, "error finding IUDMA resource\n");
return -ENXIO;
}
udc->iudma_regs = devm_ioremap_resource(dev, res); udc->iudma_regs = devm_ioremap_resource(dev, res);
if (IS_ERR(udc->iudma_regs)) if (IS_ERR(udc->iudma_regs))
return PTR_ERR(udc->iudma_regs); return PTR_ERR(udc->iudma_regs);
@ -2420,7 +2410,6 @@ static int bcm63xx_udc_remove(struct platform_device *pdev)
usb_del_gadget_udc(&udc->gadget); usb_del_gadget_udc(&udc->gadget);
BUG_ON(udc->driver); BUG_ON(udc->driver);
platform_set_drvdata(pdev, NULL);
bcm63xx_uninit_udc_hw(udc); bcm63xx_uninit_udc_hw(udc);
return 0; return 0;

View file

@ -821,8 +821,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
gi->gstrings[i] = NULL; gi->gstrings[i] = NULL;
s = usb_gstrings_attach(&gi->cdev, gi->gstrings, s = usb_gstrings_attach(&gi->cdev, gi->gstrings,
USB_GADGET_FIRST_AVAIL_IDX); USB_GADGET_FIRST_AVAIL_IDX);
if (IS_ERR(s)) if (IS_ERR(s)) {
ret = PTR_ERR(s);
goto err_comp_cleanup; goto err_comp_cleanup;
}
gi->cdev.desc.iManufacturer = s[USB_GADGET_MANUFACTURER_IDX].id; gi->cdev.desc.iManufacturer = s[USB_GADGET_MANUFACTURER_IDX].id;
gi->cdev.desc.iProduct = s[USB_GADGET_PRODUCT_IDX].id; gi->cdev.desc.iProduct = s[USB_GADGET_PRODUCT_IDX].id;
@ -847,8 +849,10 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
} }
cfg->gstrings[i] = NULL; cfg->gstrings[i] = NULL;
s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1); s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1);
if (IS_ERR(s)) if (IS_ERR(s)) {
ret = PTR_ERR(s);
goto err_comp_cleanup; goto err_comp_cleanup;
}
c->iConfiguration = s[0].id; c->iConfiguration = s[0].id;
} }

View file

@ -1001,7 +1001,6 @@ static int dummy_udc_remove(struct platform_device *pdev)
struct dummy *dum = platform_get_drvdata(pdev); struct dummy *dum = platform_get_drvdata(pdev);
usb_del_gadget_udc(&dum->gadget); usb_del_gadget_udc(&dum->gadget);
platform_set_drvdata(pdev, NULL);
device_remove_file(&dum->gadget.dev, &dev_attr_function); device_remove_file(&dum->gadget.dev, &dev_attr_function);
return 0; return 0;
} }
@ -2661,8 +2660,10 @@ static int __init init(void)
} }
for (i = 0; i < mod_data.num; i++) { for (i = 0; i < mod_data.num; i++) {
dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL); dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL);
if (!dum[i]) if (!dum[i]) {
retval = -ENOMEM;
goto err_add_pdata; goto err_add_pdata;
}
retval = platform_device_add_data(the_hcd_pdev[i], &dum[i], retval = platform_device_add_data(the_hcd_pdev[i], &dum[i],
sizeof(void *)); sizeof(void *));
if (retval) if (retval)

View file

@ -816,6 +816,7 @@ ecm_unbind(struct usb_configuration *c, struct usb_function *f)
* @c: the configuration to support the network link * @c: the configuration to support the network link
* @ethaddr: a buffer in which the ethernet address of the host side * @ethaddr: a buffer in which the ethernet address of the host side
* side of the link was recorded * side of the link was recorded
* @dev: eth_dev structure
* Context: single threaded during gadget setup * Context: single threaded during gadget setup
* *
* Returns zero on success, else negative errno. * Returns zero on success, else negative errno.

View file

@ -373,6 +373,7 @@ geth_unbind(struct usb_configuration *c, struct usb_function *f)
* @c: the configuration to support the network link * @c: the configuration to support the network link
* @ethaddr: a buffer in which the ethernet address of the host side * @ethaddr: a buffer in which the ethernet address of the host side
* side of the link was recorded * side of the link was recorded
* @dev: eth_dev structure
* Context: single threaded during gadget setup * Context: single threaded during gadget setup
* *
* Returns zero on success, else negative errno. * Returns zero on success, else negative errno.

View file

@ -456,8 +456,6 @@ static int snd_uac2_remove(struct platform_device *pdev)
{ {
struct snd_card *card = platform_get_drvdata(pdev); struct snd_card *card = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, NULL);
if (card) if (card)
return snd_card_free(card); return snd_card_free(card);

View file

@ -1461,8 +1461,10 @@ static int __init fusb300_probe(struct platform_device *pdev)
fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep, fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep,
GFP_KERNEL); GFP_KERNEL);
if (fusb300->ep0_req == NULL) if (fusb300->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3; goto clean_up3;
}
init_controller(fusb300); init_controller(fusb300);
ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget); ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget);

View file

@ -1511,8 +1511,6 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
if (pdata->exit) if (pdata->exit)
pdata->exit(&pdev->dev); pdata->exit(&pdev->dev);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

View file

@ -1660,8 +1660,10 @@ static int __init m66592_probe(struct platform_device *pdev)
m66592->epaddr2ep[0] = &m66592->ep[0]; m66592->epaddr2ep[0] = &m66592->ep[0];
m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL); m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL);
if (m66592->ep0_req == NULL) if (m66592->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3; goto clean_up3;
}
m66592->ep0_req->complete = nop_completion; m66592->ep0_req->complete = nop_completion;
init_controller(m66592); init_controller(m66592);

View file

@ -2236,7 +2236,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
dev->transceiver = NULL; dev->transceiver = NULL;
} }
platform_set_drvdata(pdev, NULL);
the_controller = NULL; the_controller = NULL;
return 0; return 0;
} }

View file

@ -1977,8 +1977,10 @@ static int __init r8a66597_probe(struct platform_device *pdev)
r8a66597->ep0_req = r8a66597_alloc_request(&r8a66597->ep[0].ep, r8a66597->ep0_req = r8a66597_alloc_request(&r8a66597->ep[0].ep,
GFP_KERNEL); GFP_KERNEL);
if (r8a66597->ep0_req == NULL) if (r8a66597->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3; goto clean_up3;
}
r8a66597->ep0_req->complete = nop_completion; r8a66597->ep0_req->complete = nop_completion;
ret = usb_add_gadget_udc(&pdev->dev, &r8a66597->gadget); ret = usb_add_gadget_udc(&pdev->dev, &r8a66597->gadget);

View file

@ -437,7 +437,7 @@ static void s3c_hsotg_unmap_dma(struct s3c_hsotg *hsotg,
if (hs_req->req.length == 0) if (hs_req->req.length == 0)
return; return;
usb_gadget_unmap_request(&hsotg->gadget, hs_req, hs_ep->dir_in); usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in);
} }
/** /**

View file

@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
irq = gpio_to_irq(udc_info->vbus_pin); irq = gpio_to_irq(udc_info->vbus_pin);
if (irq < 0) { if (irq < 0) {
dev_err(dev, "no irq for gpio vbus pin\n"); dev_err(dev, "no irq for gpio vbus pin\n");
retval = irq;
goto err_gpio_claim; goto err_gpio_claim;
} }
@ -1948,8 +1949,6 @@ static int s3c2410_udc_remove(struct platform_device *pdev)
iounmap(base_addr); iounmap(base_addr);
release_mem_region(rsrc_start, rsrc_len); release_mem_region(rsrc_start, rsrc_len);
platform_set_drvdata(pdev, NULL);
if (!IS_ERR(udc_clock) && udc_clock != NULL) { if (!IS_ERR(udc_clock) && udc_clock != NULL) {
clk_disable(udc_clock); clk_disable(udc_clock);
clk_put(udc_clock); clk_put(udc_clock);

View file

@ -284,12 +284,16 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
ss_opts->bulk_buflen = gzero_options.bulk_buflen; ss_opts->bulk_buflen = gzero_options.bulk_buflen;
func_ss = usb_get_function(func_inst_ss); func_ss = usb_get_function(func_inst_ss);
if (IS_ERR(func_ss)) if (IS_ERR(func_ss)) {
status = PTR_ERR(func_ss);
goto err_put_func_inst_ss; goto err_put_func_inst_ss;
}
func_inst_lb = usb_get_function_instance("Loopback"); func_inst_lb = usb_get_function_instance("Loopback");
if (IS_ERR(func_inst_lb)) if (IS_ERR(func_inst_lb)) {
status = PTR_ERR(func_inst_lb);
goto err_put_func_ss; goto err_put_func_ss;
}
lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst); lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst);
lb_opts->bulk_buflen = gzero_options.bulk_buflen; lb_opts->bulk_buflen = gzero_options.bulk_buflen;

View file

@ -560,6 +560,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
if (!config) { if (!config) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"failed to allocate musb hdrc config\n"); "failed to allocate musb hdrc config\n");
ret = -ENOMEM;
goto err2; goto err2;
} }

View file

@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev)
glue->control_otghs = omap_get_control_dev(); glue->control_otghs = omap_get_control_dev();
if (IS_ERR(glue->control_otghs)) { if (IS_ERR(glue->control_otghs)) {
dev_vdbg(&pdev->dev, "Failed to get control device\n"); dev_vdbg(&pdev->dev, "Failed to get control device\n");
return -ENODEV; ret = PTR_ERR(glue->control_otghs);
goto err2;
} }
} else { } else {
glue->control_otghs = ERR_PTR(-ENODEV); glue->control_otghs = ERR_PTR(-ENODEV);

View file

@ -139,7 +139,6 @@ config USB_ISP1301
tristate "NXP ISP1301 USB transceiver support" tristate "NXP ISP1301 USB transceiver support"
depends on USB || USB_GADGET depends on USB || USB_GADGET
depends on I2C depends on I2C
select USB_OTG_UTILS
help help
Say Y here to add support for the NXP ISP1301 USB transceiver driver. Say Y here to add support for the NXP ISP1301 USB transceiver driver.
This chip is typically used as USB transceiver for USB host, gadget This chip is typically used as USB transceiver for USB host, gadget

View file

@ -892,8 +892,6 @@ static int ab8500_usb_remove(struct platform_device *pdev)
else if (ab->mode == USB_PERIPHERAL) else if (ab->mode == USB_PERIPHERAL)
ab8500_usb_peri_phy_dis(ab); ab8500_usb_peri_phy_dis(ab);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

View file

@ -799,6 +799,7 @@ static int fsl_otg_conf(struct platform_device *pdev)
/* initialize the otg structure */ /* initialize the otg structure */
fsl_otg_tc->phy.label = DRIVER_DESC; fsl_otg_tc->phy.label = DRIVER_DESC;
fsl_otg_tc->phy.dev = &pdev->dev;
fsl_otg_tc->phy.set_power = fsl_otg_set_power; fsl_otg_tc->phy.set_power = fsl_otg_set_power;
fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy; fsl_otg_tc->phy.otg->phy = &fsl_otg_tc->phy;

View file

@ -266,6 +266,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, gpio_vbus); platform_set_drvdata(pdev, gpio_vbus);
gpio_vbus->dev = &pdev->dev; gpio_vbus->dev = &pdev->dev;
gpio_vbus->phy.label = "gpio-vbus"; gpio_vbus->phy.label = "gpio-vbus";
gpio_vbus->phy.dev = gpio_vbus->dev;
gpio_vbus->phy.set_power = gpio_vbus_set_power; gpio_vbus->phy.set_power = gpio_vbus_set_power;
gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend;
gpio_vbus->phy.state = OTG_STATE_UNDEFINED; gpio_vbus->phy.state = OTG_STATE_UNDEFINED;
@ -343,7 +344,6 @@ err_irq:
gpio_free(pdata->gpio_pullup); gpio_free(pdata->gpio_pullup);
gpio_free(pdata->gpio_vbus); gpio_free(pdata->gpio_vbus);
err_gpio: err_gpio:
platform_set_drvdata(pdev, NULL);
kfree(gpio_vbus->phy.otg); kfree(gpio_vbus->phy.otg);
kfree(gpio_vbus); kfree(gpio_vbus);
return err; return err;
@ -365,7 +365,6 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev)
if (gpio_is_valid(pdata->gpio_pullup)) if (gpio_is_valid(pdata->gpio_pullup))
gpio_free(pdata->gpio_pullup); gpio_free(pdata->gpio_pullup);
gpio_free(gpio); gpio_free(gpio);
platform_set_drvdata(pdev, NULL);
kfree(gpio_vbus->phy.otg); kfree(gpio_vbus->phy.otg);
kfree(gpio_vbus); kfree(gpio_vbus);

View file

@ -102,6 +102,7 @@ static int isp1301_probe(struct i2c_client *client,
mutex_init(&isp->mutex); mutex_init(&isp->mutex);
phy = &isp->phy; phy = &isp->phy;
phy->dev = &client->dev;
phy->label = DRV_NAME; phy->label = DRV_NAME;
phy->init = isp1301_phy_init; phy->init = isp1301_phy_init;
phy->set_vbus = isp1301_phy_set_vbus; phy->set_vbus = isp1301_phy_set_vbus;

View file

@ -278,11 +278,6 @@ static int mv_u3d_phy_probe(struct platform_device *pdev)
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "missing mem resource\n");
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, res); phy_base = devm_ioremap_resource(dev, res);
if (IS_ERR(phy_base)) if (IS_ERR(phy_base))
return PTR_ERR(phy_base); return PTR_ERR(phy_base);

View file

@ -667,7 +667,6 @@ int mv_otg_remove(struct platform_device *pdev)
mv_otg_disable(mvotg); mv_otg_disable(mvotg);
usb_remove_phy(&mvotg->phy); usb_remove_phy(&mvotg->phy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
@ -850,8 +849,6 @@ err_destroy_workqueue:
flush_workqueue(mvotg->qwork); flush_workqueue(mvotg->qwork);
destroy_workqueue(mvotg->qwork); destroy_workqueue(mvotg->qwork);
platform_set_drvdata(pdev, NULL);
return retval; return retval;
} }

View file

@ -130,11 +130,6 @@ static int mxs_phy_probe(struct platform_device *pdev)
int ret; int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "can't get device resources\n");
return -ENOENT;
}
base = devm_ioremap_resource(&pdev->dev, res); base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
@ -160,6 +155,7 @@ static int mxs_phy_probe(struct platform_device *pdev)
mxs_phy->phy.set_suspend = mxs_phy_suspend; mxs_phy->phy.set_suspend = mxs_phy_suspend;
mxs_phy->phy.notify_connect = mxs_phy_on_connect; mxs_phy->phy.notify_connect = mxs_phy_on_connect;
mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect;
mxs_phy->phy.type = USB_PHY_TYPE_USB2;
ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier); ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier);
@ -180,8 +176,6 @@ static int mxs_phy_remove(struct platform_device *pdev)
usb_remove_phy(&mxs_phy->phy); usb_remove_phy(&mxs_phy->phy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

View file

@ -254,8 +254,6 @@ static int nop_usb_xceiv_remove(struct platform_device *pdev)
usb_remove_phy(&nop->phy); usb_remove_phy(&nop->phy);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }

View file

@ -363,11 +363,6 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
int ret; int ret;
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!phy_mem) {
dev_err(dev, "%s: missing mem resource\n", __func__);
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, phy_mem); phy_base = devm_ioremap_resource(dev, phy_mem);
if (IS_ERR(phy_base)) if (IS_ERR(phy_base))
return PTR_ERR(phy_base); return PTR_ERR(phy_base);

View file

@ -239,11 +239,6 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
int ret; int ret;
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!phy_mem) {
dev_err(dev, "%s: missing mem resource\n", __func__);
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, phy_mem); phy_base = devm_ioremap_resource(dev, phy_mem);
if (IS_ERR(phy_base)) if (IS_ERR(phy_base))
return PTR_ERR(phy_base); return PTR_ERR(phy_base);

View file

@ -563,9 +563,8 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g)
} }
/** /**
* gadget_is_superspeed() - return true if the hardware handles * gadget_is_superspeed() - return true if the hardware handles superspeed
* supperspeed * @g: controller that might support superspeed
* @g: controller that might support supper speed
*/ */
static inline int gadget_is_superspeed(struct usb_gadget *g) static inline int gadget_is_superspeed(struct usb_gadget *g)
{ {