diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-10 08:33:50 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-08-14 18:10:14 +0200 |
commit | 08e3351b4b4c6d5a9a99c804f06db830402f3594 (patch) | |
tree | ce2f87ab734e6d4194da591cfb4dff270694010f /drivers/i2c | |
parent | i2c: pxa: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-08e3351b4b4c6d5a9a99c804f06db830402f3594.tar.xz linux-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.c | 3 |
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); |