2013-09-02 01:23:19

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 1/2] dma: sh: use devm_ioremap_resource() instead of devm_request_and_ioremap()

Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <[email protected]>
---
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 bf85b8e..7c1ffaa 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -358,9 +358,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);

--
1.7.10.4


2013-09-02 01:25:20

by Jingoo Han

[permalink] [raw]
Subject: PATCH 2/2] dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap()

Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/dma/k3dma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index ef7bc85..a2c330f 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -673,9 +673,9 @@ static int k3_dma_probe(struct platform_device *op)
if (!d)
return -ENOMEM;

- d->base = devm_request_and_ioremap(&op->dev, iores);
- if (!d->base)
- return -EADDRNOTAVAIL;
+ d->base = devm_ioremap_resource(&op->dev, iores);
+ if (IS_ERR(d->base))
+ return PTR_ERR(d->base);

of_id = of_match_device(k3_pdma_dt_ids, &op->dev);
if (of_id) {
--
1.7.10.4

2013-09-02 01:26:27

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 2/2] dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap()

Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/dma/k3dma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index ef7bc85..a2c330f 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -673,9 +673,9 @@ static int k3_dma_probe(struct platform_device *op)
if (!d)
return -ENOMEM;

- d->base = devm_request_and_ioremap(&op->dev, iores);
- if (!d->base)
- return -EADDRNOTAVAIL;
+ d->base = devm_ioremap_resource(&op->dev, iores);
+ if (IS_ERR(d->base))
+ return PTR_ERR(d->base);

of_id = of_match_device(k3_pdma_dt_ids, &op->dev);
if (of_id) {
--
1.7.10.4

2013-09-02 02:31:03

by zhangfei

[permalink] [raw]
Subject: Re: [PATCH 2/2] dma: k3dma: use devm_ioremap_resource() instead of devm_request_and_ioremap()

On 13-09-02 09:26 AM, Jingoo Han wrote:
> Use devm_ioremap_resource() because devm_request_and_ioremap() is
> obsoleted by devm_ioremap_resource().
>
> Signed-off-by: Jingoo Han <[email protected]>

Thanks Jingoo for point out.

Acked-by: Zhangfei Gao <[email protected]>

> ---
> drivers/dma/k3dma.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
> index ef7bc85..a2c330f 100644
> --- a/drivers/dma/k3dma.c
> +++ b/drivers/dma/k3dma.c
> @@ -673,9 +673,9 @@ static int k3_dma_probe(struct platform_device *op)
> if (!d)
> return -ENOMEM;
>
> - d->base = devm_request_and_ioremap(&op->dev, iores);
> - if (!d->base)
> - return -EADDRNOTAVAIL;
> + d->base = devm_ioremap_resource(&op->dev, iores);
> + if (IS_ERR(d->base))
> + return PTR_ERR(d->base);
>
> of_id = of_match_device(k3_pdma_dt_ids, &op->dev);
> if (of_id) {
>

2013-09-02 07:20:45

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 1/2] dma: sh: use devm_ioremap_resource() instead of devm_request_and_ioremap()

On Mon, Sep 02, 2013 at 10:23:15AM +0900, Jingoo Han wrote:
> Use devm_ioremap_resource() because devm_request_and_ioremap() is
> obsoleted by devm_ioremap_resource().
Applied both, Thanks

~Vinod

2013-09-02 12:55:32

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 1/2] dma: sh: use devm_ioremap_resource() instead of devm_request_and_ioremap()

On Mon, Sep 02, 2013 at 12:04:29PM +0530, Vinod Koul wrote:
> On Mon, Sep 02, 2013 at 10:23:15AM +0900, Jingoo Han wrote:
> > Use devm_ioremap_resource() because devm_request_and_ioremap() is
> > obsoleted by devm_ioremap_resource().
> Applied both, Thanks
I have removed this one and reapplied patch 2. This was duplicate of Julia's
patch which was sent earlier, so I have applied that one

~Vinod
--