aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-spear.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-11 16:29:15 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-18 16:36:11 -0800
commit09796be19a7ff45aef763d3bb01053be8cdb915a (patch)
tree00def40a1ee037f161e6d0a2d14cbd634edab9a2 /drivers/usb/host/ohci-spear.c
parentUSB: ohci-ppc-of: Use devm_ioremap_resource() (diff)
downloadlinux-dev-09796be19a7ff45aef763d3bb01053be8cdb915a.tar.xz
linux-dev-09796be19a7ff45aef763d3bb01053be8cdb915a.zip
USB: ohci-spear: Use devm_ioremap_resource()
Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-spear.c')
-rw-r--r--drivers/usb/host/ohci-spear.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index 4cb98abc0bef..8b29a0c04c23 100644
--- a/drivers/usb/host/ohci-spear.c
+++ b/drivers/usb/host/ohci-spear.c
@@ -81,17 +81,10 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
hcd->rsrc_start = pdev->resource[0].start;
hcd->rsrc_len = resource_size(res);
- if (!devm_request_mem_region(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len,
- hcd_name)) {
- dev_dbg(&pdev->dev, "request_mem_region failed\n");
- retval = -EBUSY;
- goto err_put_hcd;
- }
- hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len);
- if (!hcd->regs) {
- dev_dbg(&pdev->dev, "ioremap failed\n");
- retval = -ENOMEM;
+ hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(hcd->regs)) {
+ retval = PTR_ERR(hcd->regs);
goto err_put_hcd;
}