diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-09-05 06:45:32 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-09-05 23:33:25 +0300 |
commit | 22ac74a6194798ce131c55ff0dfbb9697650e626 (patch) | |
tree | fd98755d375199f5c4efa71bd41c502cede58031 /drivers/i2c/busses/i2c-uniphier-f.c | |
parent | fe050f99072d6b5175c35427a6f72846790441ec (diff) | |
download | linux-22ac74a6194798ce131c55ff0dfbb9697650e626.tar.xz |
i2c: uniphier(-f): use devm_platform_ioremap_resource()
Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().
This allows to remove the local variable for (struct resource *), and
have one function call less.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-uniphier-f.c')
-rw-r--r-- | drivers/i2c/busses/i2c-uniphier-f.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index 7acca2599f04..fc5354845ffa 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c +++ b/drivers/i2c/busses/i2c-uniphier-f.c @@ -538,7 +538,6 @@ static int uniphier_fi2c_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct uniphier_fi2c_priv *priv; - struct resource *regs; u32 bus_speed; unsigned long clk_rate; int irq, ret; @@ -547,8 +546,7 @@ static int uniphier_fi2c_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->membase = devm_ioremap_resource(dev, regs); + priv->membase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->membase)) return PTR_ERR(priv->membase); |