diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-09-18 14:40:30 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-11-11 11:45:01 +0300 |
commit | f20781e5f38eec12174c6d3f018ba001d2e9087d (patch) | |
tree | f8558a872b1822bc60ec5af60bd45d8ede5f3247 /drivers/mfd/ipaq-micro.c | |
parent | eeb86ed3eafadd51dd97677856b68d6294eea00f (diff) | |
download | linux-f20781e5f38eec12174c6d3f018ba001d2e9087d.tar.xz |
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>
Diffstat (limited to 'drivers/mfd/ipaq-micro.c')
-rw-r--r-- | drivers/mfd/ipaq-micro.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index a1d9be82734d..e92eeeb67a98 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -396,11 +396,7 @@ static int __init micro_probe(struct platform_device *pdev) if (IS_ERR(micro->base)) return PTR_ERR(micro->base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res) - return -EINVAL; - - micro->sdlc = devm_ioremap_resource(&pdev->dev, res); + micro->sdlc = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(micro->sdlc)) return PTR_ERR(micro->sdlc); |