]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: ipaq-micro: Use devm_ioremap_resource()
authorJingoo Han <jg1.han@samsung.com>
Wed, 14 May 2014 03:17:14 +0000 (12:17 +0900)
committerLee Jones <lee.jones@linaro.org>
Fri, 23 May 2014 09:34:29 +0000 (10:34 +0100)
Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/ipaq-micro.c

index 1763d6db346ea31d164fc68ecc05737b1eb115f3..5d08daf3bd2ba05b527614497890317a3c133a21 100644 (file)
@@ -403,17 +403,17 @@ static int micro_probe(struct platform_device *pdev)
        if (!res)
                return -EINVAL;
 
-       micro->base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!micro->base)
-               return -ENOMEM;
+       micro->base = devm_ioremap_resource(&pdev->dev, res);
+       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_request_and_ioremap(&pdev->dev, res);
-       if (!micro->sdlc)
-               return -ENOMEM;
+       micro->sdlc = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(micro->sdlc))
+               return PTR_ERR(micro->sdlc);
 
        micro_reset_comm(micro);