drivers: pinctrl: vt8500: use devm_ioremap_resource()
authorLaurent Navet <laurent.navet@gmail.com>
Sun, 12 May 2013 14:59:51 +0000 (16:59 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 16 Jun 2013 09:56:49 +0000 (11:56 +0200)
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_ioremap_resource.cocci

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/vt8500/pinctrl-wmt.c

index 70d986e..fb30edf 100644 (file)
@@ -569,10 +569,10 @@ int wmt_pinctrl_probe(struct platform_device *pdev,
        struct resource *res;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       data->base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!data->base) {
+       data->base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(data->base)) {
                dev_err(&pdev->dev, "failed to map memory resource\n");
-               return -EBUSY;
+               return PTR_ERR(data->base);
        }
 
        wmt_desc.pins = data->pins;