Re: [PATCH 24/33] rtc: Convert to devm_ioremap_resource()

From: Viresh Kumar
Date: Mon Jan 21 2013 - 05:50:12 EST


On Mon, Jan 21, 2013 at 3:39 PM, Thierry Reding
<thierry.reding@xxxxxxxxxxxxxxxxx> wrote:
> diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
> index c2121b5..a18c319 100644
> --- a/drivers/rtc/rtc-spear.c
> +++ b/drivers/rtc/rtc-spear.c
> @@ -385,11 +385,9 @@ static int spear_rtc_probe(struct platform_device *pdev)
> return status;
> }
>
> - config->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
> - if (!config->ioaddr) {
> - dev_err(&pdev->dev, "request-ioremap fail\n");

can we keep it as is?

> - return -ENOMEM;
> - }
> + config->ioaddr = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(config->ioaddr))
> + return PTR_ERR(config->ioaddr);
>

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/