* [PATCH v2] pinctrl: st: remove gpiochip in failure cases
@ 2014-09-09 7:51 Pramod Gurav
2014-09-09 11:27 ` Srinivas Kandagatla
2014-09-23 14:53 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Pramod Gurav @ 2014-09-09 7:51 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel, kernel
Cc: Srinivas Kandagatla, Srinivas Kandagatla, Maxime Coquelin,
Patrice Chotard, Linus Walleij, Bjorn Andersson
This patch releases gpiochip related resources by calling
gpiochip_remove when gpiochip_irqchip_add fails.
CC: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
CC: Srinivas Kandagatla <srinivas.kandagatla@linaro.com>
CC: Maxime Coquelin <maxime.coquelin@st.com>
CC: Patrice Chotard <patrice.chotard@st.com>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
Changes since v1:
Dropped adding remove function as it will never be tested as
the driver is bool.
drivers/pinctrl/pinctrl-st.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 5475374..af2f589 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1517,6 +1517,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
0, handle_simple_irq,
IRQ_TYPE_LEVEL_LOW);
if (err) {
+ gpiochip_remove(&bank->gpio_chip);
dev_info(dev, "could not add irqchip\n");
return err;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] pinctrl: st: remove gpiochip in failure cases
2014-09-09 7:51 [PATCH v2] pinctrl: st: remove gpiochip in failure cases Pramod Gurav
@ 2014-09-09 11:27 ` Srinivas Kandagatla
2014-09-23 14:53 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2014-09-09 11:27 UTC (permalink / raw)
To: Pramod Gurav, linux-kernel, linux-arm-kernel, kernel
Cc: Srinivas Kandagatla, Srinivas Kandagatla, Maxime Coquelin,
Patrice Chotard, Linus Walleij, Bjorn Andersson
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
On 09/09/14 08:51, Pramod Gurav wrote:
> This patch releases gpiochip related resources by calling
> gpiochip_remove when gpiochip_irqchip_add fails.
>
> CC: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
> CC: Srinivas Kandagatla <srinivas.kandagatla@linaro.com>
> CC: Maxime Coquelin <maxime.coquelin@st.com>
> CC: Patrice Chotard <patrice.chotard@st.com>
> CC: Linus Walleij <linus.walleij@linaro.org>
> CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> ---
> Changes since v1:
> Dropped adding remove function as it will never be tested as
> the driver is bool.
>
> drivers/pinctrl/pinctrl-st.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 5475374..af2f589 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1517,6 +1517,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
> 0, handle_simple_irq,
> IRQ_TYPE_LEVEL_LOW);
> if (err) {
> + gpiochip_remove(&bank->gpio_chip);
> dev_info(dev, "could not add irqchip\n");
> return err;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] pinctrl: st: remove gpiochip in failure cases
2014-09-09 7:51 [PATCH v2] pinctrl: st: remove gpiochip in failure cases Pramod Gurav
2014-09-09 11:27 ` Srinivas Kandagatla
@ 2014-09-23 14:53 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2014-09-23 14:53 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-kernel, linux-arm-kernel, kernel, Srinivas Kandagatla,
Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
Bjorn Andersson
On Tue, Sep 9, 2014 at 9:51 AM, Pramod Gurav
<pramod.gurav@smartplayin.com> wrote:
> This patch releases gpiochip related resources by calling
> gpiochip_remove when gpiochip_irqchip_add fails.
>
> CC: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
> CC: Srinivas Kandagatla <srinivas.kandagatla@linaro.com>
> CC: Maxime Coquelin <maxime.coquelin@st.com>
> CC: Patrice Chotard <patrice.chotard@st.com>
> CC: Linus Walleij <linus.walleij@linaro.org>
> CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> ---
> Changes since v1:
> Dropped adding remove function as it will never be tested as
> the driver is bool.
Patch applied with Srinivas ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-23 14:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 7:51 [PATCH v2] pinctrl: st: remove gpiochip in failure cases Pramod Gurav
2014-09-09 11:27 ` Srinivas Kandagatla
2014-09-23 14:53 ` Linus Walleij
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).