Re: [PATCH 11/12] USB: ohci-spear: Use devm_ioremap_resource()

2013-12-16 Thread Viresh Kumar
On 11 December 2013 12:59, Jingoo Han jg1@samsung.com wrote:
 Use devm_ioremap_resource() to make cleanup paths simpler.

 Signed-off-by: Jingoo Han jg1@samsung.com
 ---
  drivers/usb/host/ohci-spear.c |   13 +++--
  1 file changed, 3 insertions(+), 10 deletions(-)

Acked-by: Viresh Kumar viresh.ku...@linaro.org
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/12] USB: ohci-spear: Use devm_ioremap_resource()

2013-12-10 Thread Jingoo Han
Use devm_ioremap_resource() to make cleanup paths simpler.

Signed-off-by: Jingoo Han jg1@samsung.com
---
 drivers/usb/host/ohci-spear.c |   13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index 4cb98ab..8b29a0c 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;
}
 
-- 
1.7.10.4


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html