[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160224181109.GO21240@tuxbot>
Date: Wed, 24 Feb 2016 10:11:09 -0800
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Laxman Dewangan <ldewangan@...dia.com>
Cc: linus.walleij@...aro.org, corbet@....net, lee@...nel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com,
linux-mediatek@...ts.infradead.org,
Bjorn Andersson <bjorn.andersson@...ymobile.com>,
Thomas Gleixner <tglx@...utronix.de>,
Lee Jones <lee.jones@...aro.org>,
Stephen Boyd <sboyd@...eaurora.org>
Subject: Re: [PATCH 21/50] pinctrl: msm: Use devm_pinctrl_register() for
pinctrl registration
On Wed 24 Feb 05:15 PST 2016, Laxman Dewangan wrote:
> Use devm_pinctrl_register() for pin control registration and clean
> the error path.
>
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> Cc: Bjorn Andersson <bjorn.andersson@...ymobile.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Lee Jones <lee.jones@...aro.org>
> Cc: Stephen Boyd <sboyd@...eaurora.org>
> ---
Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Regards,
Bjorn
> drivers/pinctrl/qcom/pinctrl-msm.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index 8777cf0..dc7bf77 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -898,17 +898,16 @@ int msm_pinctrl_probe(struct platform_device *pdev,
> msm_pinctrl_desc.name = dev_name(&pdev->dev);
> msm_pinctrl_desc.pins = pctrl->soc->pins;
> msm_pinctrl_desc.npins = pctrl->soc->npins;
> - pctrl->pctrl = pinctrl_register(&msm_pinctrl_desc, &pdev->dev, pctrl);
> + pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &msm_pinctrl_desc,
> + pctrl);
> if (IS_ERR(pctrl->pctrl)) {
> dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
> return PTR_ERR(pctrl->pctrl);
> }
>
> ret = msm_gpio_init(pctrl);
> - if (ret) {
> - pinctrl_unregister(pctrl->pctrl);
> + if (ret)
> return ret;
> - }
>
> platform_set_drvdata(pdev, pctrl);
>
> @@ -923,7 +922,6 @@ int msm_pinctrl_remove(struct platform_device *pdev)
> struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
>
> gpiochip_remove(&pctrl->chip);
> - pinctrl_unregister(pctrl->pctrl);
>
> unregister_restart_handler(&pctrl->restart_nb);
>
> --
> 2.1.4
>
Powered by blists - more mailing lists