diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-11-10 17:23:42 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-11-12 21:24:48 +0100 |
commit | 8502bee5584235943c4d371597c740d6779991db (patch) | |
tree | 5d5f15896f0ea8c8dc312f52cf617a9cccddad02 /drivers/i2c | |
parent | 4bae6da1cbf4658a92e6f58da30bf536746d1e5d (diff) | |
download | linux-stable-8502bee5584235943c4d371597c740d6779991db.tar.gz linux-stable-8502bee5584235943c4d371597c740d6779991db.tar.bz2 linux-stable-8502bee5584235943c4d371597c740d6779991db.zip |
i2c: imx: 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.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 3082183bd66a..1ce0cf7a323f 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1449,8 +1449,7 @@ static int i2c_imx_probe(struct platform_device *pdev) if (irq < 0) return irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); |