Skip to content

Commit

Permalink
drivers: net: can: grcan: use devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Navet authored and Marc Kleine-Budde committed May 16, 2013
1 parent dbbffe6 commit bc441bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/can/grcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bc441bc

Please sign in to comment.