drivers: net: can: grcan: use devm_ioremap_resource()
authorLaurent Navet <laurent.navet@gmail.com>
Mon, 13 May 2013 15:27:51 +0000 (17:27 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 16 May 2013 11:27:15 +0000 (13:27 +0200)
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
dev_err() message is no more needed since it's already displayed in
devm_ioremap_resource().

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Acked-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/grcan.c

index 17fbc7a..9e9d0d6 100644 (file)
@@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
        }
 
        res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
-       base = devm_request_and_ioremap(&ofdev->dev, res);
-       if (!base) {
-               dev_err(&ofdev->dev, "couldn't map IO resource\n");
-               err = -EADDRNOTAVAIL;
+       base = devm_ioremap_resource(&ofdev->dev, res);
+       if (IS_ERR(base)) {
+               err = PTR_ERR(base);
                goto exit_error;
        }