linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bjorn.andersson@linaro.org (Bjorn Andersson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 19/50] pinctrl: ssbi-gpi: Use devm_pinctrl_register() for pinctrl registration
Date: Wed, 24 Feb 2016 10:08:41 -0800	[thread overview]
Message-ID: <20160224180841.GM21240@tuxbot> (raw)
In-Reply-To: <1456319775-3216-20-git-send-email-ldewangan@nvidia.com>

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@nvidia.com>
> Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

>  drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> index cd8580d..f71dda6 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> @@ -729,7 +729,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
>  	pctrl->desc.custom_conf_items = pm8xxx_conf_items;
>  #endif
>  
> -	pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl);
> +	pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl);
>  	if (IS_ERR(pctrl->pctrl)) {
>  		dev_err(&pdev->dev, "couldn't register pm8xxx gpio driver\n");
>  		return PTR_ERR(pctrl->pctrl);
> @@ -745,7 +745,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
>  	ret = gpiochip_add_data(&pctrl->chip, pctrl);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed register gpiochip\n");
> -		goto unregister_pinctrl;
> +		return ret;
>  	}
>  
>  	ret = gpiochip_add_pin_range(&pctrl->chip,
> @@ -765,9 +765,6 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
>  unregister_gpiochip:
>  	gpiochip_remove(&pctrl->chip);
>  
> -unregister_pinctrl:
> -	pinctrl_unregister(pctrl->pctrl);
> -
>  	return ret;
>  }
>  
> @@ -777,8 +774,6 @@ static int pm8xxx_gpio_remove(struct platform_device *pdev)
>  
>  	gpiochip_remove(&pctrl->chip);
>  
> -	pinctrl_unregister(pctrl->pctrl);
> -
>  	return 0;
>  }
>  
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-02-24 18:08 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 13:15 [PATCH 00/50] pinctrl: Add and use devm_ apis for pinctrl_{register, unregister} Laxman Dewangan
2016-02-24 13:15 ` [PATCH 01/50] pinctrl: Add " Laxman Dewangan
2016-02-24 18:21   ` Bjorn Andersson
2016-02-25 14:46   ` Philipp Zabel
2016-02-24 13:15 ` [PATCH 02/50] pinctrl: Add resource management devm_pinctrl_{register, unregister} Laxman Dewangan
2016-02-24 13:15 ` [PATCH 03/50] pinctrl: bcm281xx: Use devm_pinctrl_register() for pinctrl registration Laxman Dewangan
2016-02-24 18:25   ` Ray Jui
2016-02-24 13:15 ` [PATCH 04/50] pinctrl: bcm2835: " Laxman Dewangan
2016-02-24 18:27   ` Ray Jui
2016-02-24 13:15 ` [PATCH 05/50] pinctrl: cygnus-mux: " Laxman Dewangan
2016-02-24 18:27   ` Ray Jui
2016-02-24 13:15 ` [PATCH 06/50] pinctrl: iproc-gpio: " Laxman Dewangan
2016-02-24 18:29   ` Ray Jui
2016-02-24 13:15 ` [PATCH 07/50] pinctrl: nsp-gpio: " Laxman Dewangan
2016-02-24 18:30   ` Ray Jui
2016-02-24 13:15 ` [PATCH 08/50] pinctrl: berlin: " Laxman Dewangan
2016-02-24 17:28   ` Antoine Ténart
2016-02-24 13:15 ` [PATCH 09/50] pinctrl: imx: " Laxman Dewangan
2016-02-25 14:47   ` Philipp Zabel
2016-02-29  3:04   ` Shawn Guo
2016-02-24 13:15 ` [PATCH 10/50] pinctrl: imxl: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 11/50] pinctrl: cherryview: " Laxman Dewangan
2016-02-25 11:42   ` Heikki Krogerus
2016-02-24 13:15 ` [PATCH 12/50] pinctrl: intel: " Laxman Dewangan
2016-02-25 11:44   ` Heikki Krogerus
2016-02-24 13:15 ` [PATCH 13/50] pinctrl: mtk-common: " Laxman Dewangan
2016-02-24 13:36   ` Matthias Brugger
2016-02-24 20:28   ` Hongzhou Yang
2016-02-24 13:15 ` [PATCH 14/50] pinctrl: meson: " Laxman Dewangan
2016-02-26 20:58   ` Carlo Caione
2016-02-24 13:15 ` [PATCH 15/50] pinctrl: mvebu: " Laxman Dewangan
2016-02-24 14:07   ` Thomas Petazzoni
2016-02-24 18:28   ` kbuild test robot
2016-02-24 13:15 ` [PATCH 16/50] pinctrl: nomadic: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 17/50] pinctrl: spmi-gpio: " Laxman Dewangan
2016-02-24 18:06   ` Bjorn Andersson
2016-02-24 13:15 ` [PATCH 18/50] pinctrl: spmi: " Laxman Dewangan
2016-02-24 18:07   ` Bjorn Andersson
2016-02-24 13:15 ` [PATCH 19/50] pinctrl: ssbi-gpi: " Laxman Dewangan
2016-02-24 18:08   ` Bjorn Andersson [this message]
2016-02-24 13:15 ` [PATCH 20/50] pinctrl: ssbi-mpp: " Laxman Dewangan
2016-02-24 18:09   ` Bjorn Andersson
2016-02-24 13:15 ` [PATCH 21/50] pinctrl: msm: " Laxman Dewangan
2016-02-24 18:11   ` Bjorn Andersson
2016-02-24 13:15 ` [PATCH 22/50] pinctrl: pxa: " Laxman Dewangan
2016-02-26 22:25   ` Robert Jarzmik
2016-02-24 13:15 ` [PATCH 23/50] pinctrl: exynos5440: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 24/50] pinctrl: samsung: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 25/50] pinctrl: ish-pfc: " Laxman Dewangan
2016-02-24 13:59   ` Geert Uytterhoeven
2016-02-24 13:15 ` [PATCH 26/50] pinctrl: spear: " Laxman Dewangan
2016-02-25  2:10   ` Viresh Kumar
2016-02-24 13:15 ` [PATCH 27/50] pinctrl: stm32: " Laxman Dewangan
2016-02-25 14:00   ` Maxime Coquelin
2016-02-24 13:15 ` [PATCH 28/50] pinctrl: ssbi-mpp: " Laxman Dewangan
2016-02-24 18:00   ` Maxime Ripard
2016-02-24 13:15 ` [PATCH 29/50] pinctrl: tegra: " Laxman Dewangan
2016-02-24 16:44   ` Stephen Warren
2016-02-24 13:15 ` [PATCH 30/50] pinctrl: tegra-xusb: " Laxman Dewangan
2016-02-24 16:41   ` Stephen Warren
2016-02-24 13:15 ` [PATCH 31/50] pinctrl: uniphier: " Laxman Dewangan
2016-02-26 10:06   ` Masahiro Yamada
2016-02-24 13:15 ` [PATCH 32/50] pinctrl: vt8500: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 33/50] pinctrl: adi2: " Laxman Dewangan
2016-02-24 13:15 ` [PATCH 34/50] pinctrl: amd: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 35/50] pinctrl: as3722: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 36/50] pinctrl: at91-pio4: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 37/50] pinctrl: at91: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 38/50] pinctrl: digicolor: " Laxman Dewangan
2016-02-24 13:42   ` Baruch Siach
2016-02-24 13:16 ` [PATCH 39/50] pinctrl: lantiq: " Laxman Dewangan
2016-02-25 14:24   ` John Crispin
2016-02-24 13:16 ` [PATCH 40/50] pinctrl: lpc18xx: " Laxman Dewangan
2016-02-24 15:06   ` Joachim Eastwood
2016-02-24 13:16 ` [PATCH 41/50] pinctrl: palmas: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 42/50] pinctrl: pic32: " Laxman Dewangan
2016-02-25 20:30   ` Joshua Henderson
2016-02-24 13:16 ` [PATCH 43/50] pinctrl: pistachio: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 44/50] pinctrl: rockchip: " Laxman Dewangan
2016-03-02 21:48   ` Heiko Stübner
2016-02-24 13:16 ` [PATCH 45/50] pinctrl: st: " Laxman Dewangan
2016-02-24 16:14   ` Maxime Coquelin
2016-02-24 13:16 ` [PATCH 46/50] pinctrl: tb10x: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 47/50] pinctrl: tz1090-pdc: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 48/50] pinctrl: tz1090 " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 49/50] pinctrl: u300: " Laxman Dewangan
2016-02-24 13:16 ` [PATCH 50/50] pinctrl: zynq: " Laxman Dewangan
2016-02-26  3:45   ` Sören Brinkmann
2016-02-24 17:22 ` [PATCH 00/50] pinctrl: Add and use devm_ apis for pinctrl_{register, unregister} Stefan Wahren
2016-02-24 17:14   ` Laxman Dewangan
2016-02-25 14:13 ` Linus Walleij
2016-02-28 14:44   ` Laxman Dewangan
2016-03-09 14:23     ` Laxman Dewangan
2016-03-15  8:31       ` Linus Walleij
2016-03-15 13:25         ` Laxman Dewangan
2016-03-16 13:03           ` Linus Walleij
2016-04-20  4:12         ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160224180841.GM21240@tuxbot \
    --to=bjorn.andersson@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).