pinctrl: berlin: Use devm_ioremap_resource()
authorJingoo Han <jg1.han@samsung.com>
Tue, 27 May 2014 06:29:17 +0000 (15:29 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 May 2014 14:03:24 +0000 (16:03 +0200)
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: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/berlin/berlin-bg2.c
drivers/pinctrl/berlin/berlin-bg2cd.c
drivers/pinctrl/berlin/berlin-bg2q.c

index 0d8fd509ab20395ff6302e7592b7b82b69ba4d8a..dcd4f6a4fc506cec856284e6963c464b08acae64 100644 (file)
@@ -243,9 +243,9 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base)
-               return -EADDRNOTAVAIL;
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        rmconfig->reg_bits = 32,
        rmconfig->val_bits = 32,
index e095a5d94395c4d945f1afb14b01cafd7674e9aa..89d585ef7da754c3701b223617864ffc81d89b6c 100644 (file)
@@ -186,9 +186,9 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base)
-               return -EADDRNOTAVAIL;
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        rmconfig->reg_bits = 32,
        rmconfig->val_bits = 32,
index ab33a3b60056aebed5eac04ba801641a013793b9..9fcf9836045c81ffdbc384d0507c7551e384c8f0 100644 (file)
@@ -405,9 +405,9 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!base)
-               return -EADDRNOTAVAIL;
+       base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(base))
+               return PTR_ERR(base);
 
        rmconfig->reg_bits = 32,
        rmconfig->val_bits = 32,