Re: [PATCH 21/33] pinctrl: Convert to devm_ioremap_resource()

From: Viresh Kumar
Date: Mon Jan 21 2013 - 05:56:25 EST


On Mon, Jan 21, 2013 at 3:39 PM, Thierry Reding
<thierry.reding@xxxxxxxxxxxxxxxxx> wrote:
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 3cf4ecd..295b349 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -540,11 +540,9 @@ static int plgpio_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> - plgpio->base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!plgpio->base) {
> - dev_err(&pdev->dev, "request and ioremap fail\n");

can we keep this as is?

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

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/