2023-03-06 14:46:25

by Md Sadre Alam

[permalink] [raw]
Subject: [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Md Sadre Alam <[email protected]>
---
drivers/i2c/busses/i2c-qcom-cci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 01358472680c..ed70bc1e4926 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -581,8 +581,7 @@ static int cci_probe(struct platform_device *pdev)

/* Memory */

- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cci->base = devm_ioremap_resource(dev, r);
+ cci->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(cci->base))
return PTR_ERR(cci->base);

--
2.17.1



2023-06-07 10:58:50

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource()

On Mon, Mar 06, 2023 at 08:15:22PM +0530, Md Sadre Alam wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: Md Sadre Alam <[email protected]>

Loic, Robert, do you agree with this patch?


Attachments:
(No filename) (347.00 B)
signature.asc (849.00 B)
Download all attachments

2023-06-07 12:47:32

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource()

On Wed, Jun 7, 2023 at 12:34 PM Wolfram Sang <[email protected]> wrote:
>
> On Mon, Mar 06, 2023 at 08:15:22PM +0530, Md Sadre Alam wrote:
> > Convert platform_get_resource(), devm_ioremap_resource() to a single
> > call to devm_platform_get_and_ioremap_resource(), as this is exactly
> > what this function does.
> >
> > Signed-off-by: Md Sadre Alam <[email protected]>
>
> Loic, Robert, do you agree with this patch?
>

Acked-by: Robert Foss <[email protected]>

2023-06-08 19:48:15

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource()

On Mon, Mar 06, 2023 at 08:15:22PM +0530, Md Sadre Alam wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: Md Sadre Alam <[email protected]>

Applied to for-next, thanks! Also, thanks, Robert.


Attachments:
(No filename) (354.00 B)
signature.asc (849.00 B)
Download all attachments