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

reset: lpc18xx: Use devm_platform_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly
what this function does.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202302161053360618204@zte.com.cn
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Ye Xingchen and committed by
Philipp Zabel
68fda5a9 9bf9276f

+1 -3
+1 -3
drivers/reset/reset-lpc18xx.c
··· 139 139 static int lpc18xx_rgu_probe(struct platform_device *pdev) 140 140 { 141 141 struct lpc18xx_rgu_data *rc; 142 - struct resource *res; 143 142 u32 fcclk, firc; 144 143 int ret; 145 144 ··· 146 147 if (!rc) 147 148 return -ENOMEM; 148 149 149 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 150 - rc->base = devm_ioremap_resource(&pdev->dev, res); 150 + rc->base = devm_platform_ioremap_resource(pdev, 0); 151 151 if (IS_ERR(rc->base)) 152 152 return PTR_ERR(rc->base); 153 153