aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsudc.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:22 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:58 -0500
commit148e11349b0c9c7199fd3096254bd3ea16d59a05 (patch)
tree48fa3e59a152ad95b4e545e1e623c3e442653d53 /drivers/usb/gadget/s3c-hsudc.c
parenteb612fa013ca07b954300fa46b1499248cedf926 (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/gadget/s3c-hsudc.c')
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index 52379b11f080..94ca33bb990b 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -1295,10 +1295,9 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
1295 1295
1296 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1296 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1297 1297
1298 hsudc->regs = devm_request_and_ioremap(&pdev->dev, res); 1298 hsudc->regs = devm_ioremap_resource(&pdev->dev, res);
1299 if (!hsudc->regs) { 1299 if (IS_ERR(hsudc->regs)) {
1300 dev_err(dev, "error mapping device register area\n"); 1300 ret = PTR_ERR(hsudc->regs);
1301 ret = -EBUSY;
1302 goto err_res; 1301 goto err_res;
1303 } 1302 }
1304 1303