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

mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Markus Elfring and committed by
Lee Jones
f20781e5 eeb86ed3

+1 -5
+1 -5
drivers/mfd/ipaq-micro.c
··· 396 396 if (IS_ERR(micro->base)) 397 397 return PTR_ERR(micro->base); 398 398 399 - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 400 - if (!res) 401 - return -EINVAL; 402 - 403 - micro->sdlc = devm_ioremap_resource(&pdev->dev, res); 399 + micro->sdlc = devm_platform_ioremap_resource(pdev, 1); 404 400 if (IS_ERR(micro->sdlc)) 405 401 return PTR_ERR(micro->sdlc); 406 402