public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH Resend] dma: pl330: Convert to devm_ioremap_resource()
@ 2013-03-04  9:06 Sachin Kamat
  2013-03-21  6:28 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-03-04  9:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: vinod.koul, sachin.kamat, patches, thierry.reding

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 drivers/dma/pl330.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 7181531..10005ec 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -26,6 +26,7 @@
 #include <linux/scatterlist.h>
 #include <linux/of.h>
 #include <linux/of_dma.h>
+#include <linux/err.h>
 
 #include "dmaengine.h"
 #define PL330_MAX_CHAN		8
@@ -2904,9 +2905,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
 
 	res = &adev->res;
-	pi->base = devm_request_and_ioremap(&adev->dev, res);
-	if (!pi->base)
-		return -ENXIO;
+	pi->base = devm_ioremap_resource(&adev->dev, res);
+	if (IS_ERR(pi->base))
+		return PTR_ERR(pi->base);
 
 	amba_set_drvdata(adev, pdmac);
 
-- 
1.7.4.1


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

* Re: [PATCH Resend] dma: pl330: Convert to devm_ioremap_resource()
  2013-03-04  9:06 [PATCH Resend] dma: pl330: Convert to devm_ioremap_resource() Sachin Kamat
@ 2013-03-21  6:28 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2013-03-21  6:28 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, patches, thierry.reding

On Mon, Mar 04, 2013 at 02:36:27PM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Applied thanks
> ---
>  drivers/dma/pl330.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 7181531..10005ec 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -26,6 +26,7 @@
>  #include <linux/scatterlist.h>
>  #include <linux/of.h>
>  #include <linux/of_dma.h>
> +#include <linux/err.h>
>  
>  #include "dmaengine.h"
>  #define PL330_MAX_CHAN		8
> @@ -2904,9 +2905,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  	pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
>  
>  	res = &adev->res;
> -	pi->base = devm_request_and_ioremap(&adev->dev, res);
> -	if (!pi->base)
> -		return -ENXIO;
> +	pi->base = devm_ioremap_resource(&adev->dev, res);
> +	if (IS_ERR(pi->base))
> +		return PTR_ERR(pi->base);
>  
>  	amba_set_drvdata(adev, pdmac);
>  
> -- 
> 1.7.4.1
> 

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

end of thread, other threads:[~2013-03-21  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04  9:06 [PATCH Resend] dma: pl330: Convert to devm_ioremap_resource() Sachin Kamat
2013-03-21  6:28 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox