linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Resend 1/2] mfd: omap-usb-host: Convert to devm_ioremap_resource()
@ 2013-04-09 10:46 Sachin Kamat
  2013-04-09 10:46 ` [PATCH Resend 2/2] mfd: omap-usb-tll: " Sachin Kamat
  2013-04-09 13:02 ` [PATCH Resend 1/2] mfd: omap-usb-host: " Samuel Ortiz
  0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-04-09 10:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, rogerq, sachin.kamat

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() 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: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Roger Quadros <rogerq@ti.com>
---
Rebased onto latest mfd-next tree.
---
 drivers/mfd/omap-usb-host.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index d3b6e94..759fae3 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -30,6 +30,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/err.h>
 
 #include "omap-usb.h"
 
@@ -608,11 +609,9 @@ static int usbhs_omap_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	omap->uhh_base = devm_request_and_ioremap(dev, res);
-	if (!omap->uhh_base) {
-		dev_err(dev, "Resource request/ioremap failed\n");
-		return -EADDRNOTAVAIL;
-	}
+	omap->uhh_base = devm_ioremap_resource(dev, res);
+	if (IS_ERR(omap->uhh_base))
+		return PTR_ERR(omap->uhh_base);
 
 	omap->pdata = pdata;
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH Resend 2/2] mfd: omap-usb-tll: Convert to devm_ioremap_resource()
  2013-04-09 10:46 [PATCH Resend 1/2] mfd: omap-usb-host: Convert to devm_ioremap_resource() Sachin Kamat
@ 2013-04-09 10:46 ` Sachin Kamat
  2013-04-09 13:02 ` [PATCH Resend 1/2] mfd: omap-usb-host: " Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-04-09 10:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: sameo, rogerq, sachin.kamat

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() 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: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Roger Quadros <rogerq@ti.com>
---
 drivers/mfd/omap-usb-tll.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 8f4d5a1..e59ac4c 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -226,12 +226,9 @@ static int usbtll_omap_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	tll->base = devm_request_and_ioremap(dev, res);
-	if (!tll->base) {
-		ret = -EADDRNOTAVAIL;
-		dev_err(dev, "Resource request/ioremap failed:%d\n", ret);
-		return ret;
-	}
+	tll->base = devm_ioremap_resource(dev, res);
+	if (IS_ERR(tll->base))
+		return PTR_ERR(tll->base);
 
 	platform_set_drvdata(pdev, tll);
 	pm_runtime_enable(dev);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH Resend 1/2] mfd: omap-usb-host: Convert to devm_ioremap_resource()
  2013-04-09 10:46 [PATCH Resend 1/2] mfd: omap-usb-host: Convert to devm_ioremap_resource() Sachin Kamat
  2013-04-09 10:46 ` [PATCH Resend 2/2] mfd: omap-usb-tll: " Sachin Kamat
@ 2013-04-09 13:02 ` Samuel Ortiz
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2013-04-09 13:02 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, rogerq

Hi Sachin,

On Tue, Apr 09, 2013 at 04:16:36PM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() 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: Sachin Kamat <sachin.kamat@linaro.org>
> Acked-by: Roger Quadros <rogerq@ti.com>
> ---
> Rebased onto latest mfd-next tree.
> ---
>  drivers/mfd/omap-usb-host.c |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
Both patches applied now, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-09 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 10:46 [PATCH Resend 1/2] mfd: omap-usb-host: Convert to devm_ioremap_resource() Sachin Kamat
2013-04-09 10:46 ` [PATCH Resend 2/2] mfd: omap-usb-tll: " Sachin Kamat
2013-04-09 13:02 ` [PATCH Resend 1/2] mfd: omap-usb-host: " Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).