summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaurent Navet <laurent.navet@gmail.com>2013-05-13 19:27:51 +0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-05-16 15:27:15 +0400
commitbc441bc8e36e0bcdbf21639fb78e94ffa19ea226 (patch)
tree6fdcdd8339fe8a5311ebd5016e2d1591f0152333 /drivers
parentdbbffe6898fd0d7bac66ded5d3c58835b13ddefc (diff)
downloadlinux-bc441bc8e36e0bcdbf21639fb78e94ffa19ea226.tar.xz
drivers: net: can: grcan: use devm_ioremap_resource()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/grcan.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
index 17fbc7a09224..9e9d0d628e7b 100644
--- a/drivers/net/can/grcan.c
+++ b/drivers/net/can/grcan.c
@@ -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;
}