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

Configure Feed

Select the types of activity you want to include in your feed.

regulator: uniphier: use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191009150203.8052-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

YueHaibing and committed by
Mark Brown
907becb2 73511a90

+1 -3
+1 -3
drivers/regulator/uniphier-regulator.c
··· 45 45 struct regulator_config config = { }; 46 46 struct regulator_dev *rdev; 47 47 struct regmap *regmap; 48 - struct resource *res; 49 48 void __iomem *base; 50 49 const char *name; 51 50 int i, ret, nr; ··· 57 58 if (WARN_ON(!priv->data)) 58 59 return -EINVAL; 59 60 60 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 61 - base = devm_ioremap_resource(dev, res); 61 + base = devm_platform_ioremap_resource(pdev, 0); 62 62 if (IS_ERR(base)) 63 63 return PTR_ERR(base); 64 64