diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:58 -0500 |
commit | 148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch) | |
tree | 48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/musb | |
parent | eb612fa013ca07b954300fa46b1499248cedf926 (diff) |
usb: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 7 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index f7d764de6fda..99f470d26a38 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -500,10 +500,9 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
500 | resources[0].end = resources[0].start + SZ_4 - 1; | 500 | resources[0].end = resources[0].start + SZ_4 - 1; |
501 | resources[0].flags = IORESOURCE_MEM; | 501 | resources[0].flags = IORESOURCE_MEM; |
502 | 502 | ||
503 | glue->usb_ctrl[id] = devm_request_and_ioremap(&pdev->dev, resources); | 503 | glue->usb_ctrl[id] = devm_ioremap_resource(&pdev->dev, resources); |
504 | if (glue->usb_ctrl[id] == NULL) { | 504 | if (IS_ERR(glue->usb_ctrl[id])) { |
505 | dev_err(dev, "Failed to obtain usb_ctrl%d memory\n", id); | 505 | ret = PTR_ERR(glue->usb_ctrl[id]); |
506 | ret = -ENODEV; | ||
507 | goto err0; | 506 | goto err0; |
508 | } | 507 | } |
509 | 508 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index da00af460794..acd5f9d71d03 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -523,9 +523,7 @@ static int omap2430_probe(struct platform_device *pdev) | |||
523 | 523 | ||
524 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 524 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
525 | 525 | ||
526 | glue->control_otghs = devm_request_and_ioremap(&pdev->dev, res); | 526 | glue->control_otghs = devm_ioremap_resource(&pdev->dev, res); |
527 | if (glue->control_otghs == NULL) | ||
528 | dev_dbg(&pdev->dev, "Failed to obtain control memory\n"); | ||
529 | 527 | ||
530 | if (np) { | 528 | if (np) { |
531 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 529 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |