summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/grcan.c
diff options
context:
space:
mode:
authorLaurent Navet <laurent.navet@gmail.com>2013-05-13 17:27:51 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-05-16 13:27:15 +0200
commitbc441bc8e36e0bcdbf21639fb78e94ffa19ea226 (patch)
tree6fdcdd8339fe8a5311ebd5016e2d1591f0152333 /drivers/net/can/grcan.c
parentdbbffe6898fd0d7bac66ded5d3c58835b13ddefc (diff)
downloadop-kernel-dev-bc441bc8e36e0bcdbf21639fb78e94ffa19ea226.zip
op-kernel-dev-bc441bc8e36e0bcdbf21639fb78e94ffa19ea226.tar.gz
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/net/can/grcan.c')
-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 17fbc7a..9e9d0d6 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;
}
OpenPOWER on IntegriCloud