summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-10 14:33:50 +0800
committerWolfram Sang <wsa@kernel.org>2023-08-14 18:10:14 +0200
commit08e3351b4b4c6d5a9a99c804f06db830402f3594 (patch)
treece2f87ab734e6d4194da591cfb4dff270694010f /drivers/i2c
parent733f41f7029418e2aa6f60f06c1b959a815b575a (diff)
downloadlinux-stable-08e3351b4b4c6d5a9a99c804f06db830402f3594.tar.gz
linux-stable-08e3351b4b4c6d5a9a99c804f06db830402f3594.tar.bz2
linux-stable-08e3351b4b4c6d5a9a99c804f06db830402f3594.zip
i2c: pnx: 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: Yangtao Li <frank.li@vivo.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pnx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 4ee7db512333..a12525b3186b 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -679,8 +679,7 @@ static int i2c_pnx_probe(struct platform_device *pdev)
"%s", pdev->name);
/* Register I/O resource */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- alg_data->ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ alg_data->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(alg_data->ioaddr))
return PTR_ERR(alg_data->ioaddr);