diff options
author | Dejin Zheng <zhengdejin5@gmail.com> | 2020-04-14 16:48:27 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-04-15 13:12:52 +0300 |
commit | c02fb2b8067a4b940884fc58289adad0e3866d10 (patch) | |
tree | 513e25bf9381e9879dc6b30d98fd54bec67ead32 /drivers/i2c/busses/i2c-rcar.c | |
parent | e0442d76213981ab48e8ea0874bb6c47e3af5a36 (diff) | |
download | linux-c02fb2b8067a4b940884fc58289adad0e3866d10.tar.xz |
i2c: busses: convert to devm_platform_get_and_ioremap_resource
use devm_platform_get_and_ioremap_resource() to simplify code, which
contains platform_get_resource() and devm_ioremap_resource(), it also
get the resource for use by the following code.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-rcar.c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 3b5397aa4ca6..a45c4bf1ec01 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -938,9 +938,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) return PTR_ERR(priv->clk); } - priv->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - priv->io = devm_ioremap_resource(dev, priv->res); + priv->io = devm_platform_get_and_ioremap_resource(pdev, 0, &priv->res); if (IS_ERR(priv->io)) return PTR_ERR(priv->io); |