Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bus: uniphier-system-bus: 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.

Link: https://lore.kernel.org/r/20190905032122.26076-1-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Masahiro Yamada and committed by
Arnd Bergmann
ef92bfda b8580b28

+1 -3
+1 -3
drivers/bus/uniphier-system-bus.c
··· 176 176 { 177 177 struct device *dev = &pdev->dev; 178 178 struct uniphier_system_bus_priv *priv; 179 - struct resource *regs; 180 179 const __be32 *ranges; 181 180 u32 cells, addr, size; 182 181 u64 paddr; ··· 185 186 if (!priv) 186 187 return -ENOMEM; 187 188 188 - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); 189 - priv->membase = devm_ioremap_resource(dev, regs); 189 + priv->membase = devm_platform_ioremap_resource(pdev, 0); 190 190 if (IS_ERR(priv->membase)) 191 191 return PTR_ERR(priv->membase); 192 192