diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2019-07-25 10:56:17 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-08-06 23:54:23 +0300 |
commit | 3c2588fab65fb083873c6c1e74a1be54345615eb (patch) | |
tree | 33389cc7ea64caf651d51e68438979ea34ebee73 /drivers/i2c/busses/i2c-sprd.c | |
parent | 4d7802aa434a39921c699683c4ca2ad9068b0033 (diff) | |
download | linux-3c2588fab65fb083873c6c1e74a1be54345615eb.tar.xz |
i2c: sprd: Change to use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-sprd.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sprd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c index 8002835d1543..bbcb0569522d 100644 --- a/drivers/i2c/busses/i2c-sprd.c +++ b/drivers/i2c/busses/i2c-sprd.c @@ -478,7 +478,6 @@ static int sprd_i2c_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sprd_i2c *i2c_dev; - struct resource *res; u32 prop; int ret; @@ -488,8 +487,7 @@ static int sprd_i2c_probe(struct platform_device *pdev) if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(dev, res); + i2c_dev->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); |