All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: riic: Use devm_platform_ioremap_resource()
@ 2022-09-13 17:01 Prabhakar
  2022-09-17 18:35 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar @ 2022-09-13 17:01 UTC (permalink / raw)
  To: Wolfram Sang, Chris Brandt, Geert Uytterhoeven
  Cc: linux-renesas-soc, linux-i2c, linux-kernel, Prabhakar, Biju Das,
	Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Use the devm_platform_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/i2c/busses/i2c-riic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index ecba1dfc1278..849848ccb080 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -400,7 +400,6 @@ static int riic_i2c_probe(struct platform_device *pdev)
 {
 	struct riic_dev *riic;
 	struct i2c_adapter *adap;
-	struct resource *res;
 	struct i2c_timings i2c_t;
 	struct reset_control *rstc;
 	int i, ret;
@@ -409,8 +408,7 @@ static int riic_i2c_probe(struct platform_device *pdev)
 	if (!riic)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	riic->base = devm_ioremap_resource(&pdev->dev, res);
+	riic->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(riic->base))
 		return PTR_ERR(riic->base);
 
-- 
2.25.1


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

* Re: [PATCH] i2c: riic: Use devm_platform_ioremap_resource()
  2022-09-13 17:01 [PATCH] i2c: riic: Use devm_platform_ioremap_resource() Prabhakar
@ 2022-09-17 18:35 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-09-17 18:35 UTC (permalink / raw)
  To: Prabhakar
  Cc: Chris Brandt, Geert Uytterhoeven, linux-renesas-soc, linux-i2c,
	linux-kernel, Biju Das, Lad Prabhakar

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On Tue, Sep 13, 2022 at 06:01:21PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Use the devm_platform_ioremap_resource() helper instead of calling
> platform_get_resource() and devm_ioremap_resource() separately.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2022-09-17 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 17:01 [PATCH] i2c: riic: Use devm_platform_ioremap_resource() Prabhakar
2022-09-17 18:35 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.