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

clocksource/drivers/em_sti: Convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code, which
wraps 'platform_get_resource' and 'devm_ioremap_resource' in a
single helper.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191221173027.30716-2-tiny.windzz@gmail.com

authored by

Yangtao Li and committed by
Daniel Lezcano
9a97b2fb 2052d032

+1 -3
+1 -3
drivers/clocksource/em_sti.c
··· 279 279 static int em_sti_probe(struct platform_device *pdev) 280 280 { 281 281 struct em_sti_priv *p; 282 - struct resource *res; 283 282 int irq; 284 283 int ret; 285 284 ··· 294 295 return irq; 295 296 296 297 /* map memory, let base point to the STI instance */ 297 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 298 - p->base = devm_ioremap_resource(&pdev->dev, res); 298 + p->base = devm_platform_ioremap_resource(pdev, 0); 299 299 if (IS_ERR(p->base)) 300 300 return PTR_ERR(p->base); 301 301