From: Silviu-Mihai Popescu Date: Wed, 10 Apr 2013 21:01:51 +0000 (+0300) Subject: mtd: devices: convert OMAP BCH to devm_ioremap_resource() X-Git-Tag: MMI-PSA29.97-13-9~13677^2~170 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=435796889d714ffaf90923cfea868d8b5d28008c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mtd: devices: convert OMAP BCH to devm_ioremap_resource() Convert all users of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: Silviu-Mihai Popescu Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index dccef9fdc1f2..fc8ad9f13910 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -351,9 +351,9 @@ static int elm_probe(struct platform_device *pdev) return -ENODEV; } - info->elm_base = devm_request_and_ioremap(&pdev->dev, res); - if (!info->elm_base) - return -EADDRNOTAVAIL; + info->elm_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->elm_base)) + return PTR_ERR(info->elm_base); ret = devm_request_irq(&pdev->dev, irq->start, elm_isr, 0, pdev->name, info);