mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 21:54:06 +08:00
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>
This commit is contained in:
parent
dbbffe6898
commit
bc441bc8e3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user