diff mbox

[02/15] sudmac: Convert to use devm_ioremap_resource

Message ID 1370864113-17895-3-git-send-email-tushar.behera@linaro.org
State New
Headers show

Commit Message

Tushar Behera June 10, 2013, 11:35 a.m. UTC
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: Vinod Koul <vinod.koul@intel.com>
CC: Dan Williams <djbw@fb.com>
---
 drivers/dma/sh/sudmac.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tushar Behera June 17, 2013, 6:11 a.m. UTC | #1
On 06/10/2013 05:05 PM, Tushar Behera wrote:
> Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
> introduced devm_ioremap_resource() and deprecated the use of
> devm_request_and_ioremap().
> 
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> CC: Vinod Koul <vinod.koul@intel.com>
> CC: Dan Williams <djbw@fb.com>
> ---
>  drivers/dma/sh/sudmac.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
> index e7c94bb..0a81e30 100644
> --- a/drivers/dma/sh/sudmac.c
> +++ b/drivers/dma/sh/sudmac.c
> @@ -360,9 +360,9 @@ static int sudmac_probe(struct platform_device *pdev)
>  
>  	dma_dev = &su_dev->shdma_dev.dma_dev;
>  
> -	su_dev->chan_reg = devm_request_and_ioremap(&pdev->dev, chan);
> -	if (!su_dev->chan_reg)
> -		return err;
> +	su_dev->chan_reg = devm_ioremap_resource(&pdev->dev, chan);
> +	if (IS_ERR(su_dev->chan_reg))
> +		return PTR_ERR(su_dev->chan_reg);
>  
>  	dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);
>  
> 

Ping.
diff mbox

Patch

diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
index e7c94bb..0a81e30 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -360,9 +360,9 @@  static int sudmac_probe(struct platform_device *pdev)
 
 	dma_dev = &su_dev->shdma_dev.dma_dev;
 
-	su_dev->chan_reg = devm_request_and_ioremap(&pdev->dev, chan);
-	if (!su_dev->chan_reg)
-		return err;
+	su_dev->chan_reg = devm_ioremap_resource(&pdev->dev, chan);
+	if (IS_ERR(su_dev->chan_reg))
+		return PTR_ERR(su_dev->chan_reg);
 
 	dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);