All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.coquelin@st.com (Maxime Coquelin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: st: Add remove function and remove gpio_chip on failure
Date: Fri, 5 Sep 2014 09:27:35 +0200	[thread overview]
Message-ID: <540965E7.7040302@st.com> (raw)
In-Reply-To: <5408AA8C.7040100@linaro.org>

Hi Pramod, Srini

On 09/04/2014 08:08 PM, Srinivas Kandagatla wrote:
> Pramod,
> sorry for delay in reply as I was travelling, still in Jet lag.
>> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
>> ---
>>   drivers/pinctrl/pinctrl-st.c |   25 +++++++++++++++++++++++++
>>   1 files changed, 25 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
>> index 5475374..9296845 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);
> This change-set looks good.
> IMO, you can send a patch for this change set.

Removing the gpiochip here looks good to me too.

>
>>               dev_info(dev, "could not add irqchip\n");
>>               return err;
>>           }
>> @@ -1685,6 +1686,29 @@ static int st_pctl_probe(struct platform_device
>> *pdev)
>>       return 0;
>>   }
>>
>
>> +static int st_pctl_remove(struct platform_device *pdev)
>> +{
> Ideally this driver will not be removed, as other drivers depend on
> this, even the serial.
>
> so I see no big achievement in adding the remove functionality, as this
> is going to be a dead code and would never be tested.

Agree too.

Thanks,
Maxime

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Coquelin <maxime.coquelin@st.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Pramod Gurav <pramod.gurav@smartplayin.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <kernel@stlinux.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Subject: Re: [PATCH] pinctrl: st: Add remove function and remove gpio_chip on failure
Date: Fri, 5 Sep 2014 09:27:35 +0200	[thread overview]
Message-ID: <540965E7.7040302@st.com> (raw)
In-Reply-To: <5408AA8C.7040100@linaro.org>

Hi Pramod, Srini

On 09/04/2014 08:08 PM, Srinivas Kandagatla wrote:
> Pramod,
> sorry for delay in reply as I was travelling, still in Jet lag.
>> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
>> ---
>>   drivers/pinctrl/pinctrl-st.c |   25 +++++++++++++++++++++++++
>>   1 files changed, 25 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
>> index 5475374..9296845 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);
> This change-set looks good.
> IMO, you can send a patch for this change set.

Removing the gpiochip here looks good to me too.

>
>>               dev_info(dev, "could not add irqchip\n");
>>               return err;
>>           }
>> @@ -1685,6 +1686,29 @@ static int st_pctl_probe(struct platform_device
>> *pdev)
>>       return 0;
>>   }
>>
>
>> +static int st_pctl_remove(struct platform_device *pdev)
>> +{
> Ideally this driver will not be removed, as other drivers depend on
> this, even the serial.
>
> so I see no big achievement in adding the remove functionality, as this
> is going to be a dead code and would never be tested.

Agree too.

Thanks,
Maxime

  parent reply	other threads:[~2014-09-05  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-30 14:45 [PATCH] pinctrl: st: Add remove function and remove gpio_chip on failure Pramod Gurav
2014-08-30 14:45 ` Pramod Gurav
2014-09-04 16:53 ` Linus Walleij
2014-09-04 16:53   ` Linus Walleij
2014-09-04 18:08 ` Srinivas Kandagatla
2014-09-04 18:08   ` Srinivas Kandagatla
2014-09-05  4:48   ` Pramod Gurav
2014-09-05  4:48     ` Pramod Gurav
2014-09-05  7:27   ` Maxime Coquelin [this message]
2014-09-05  7:27     ` Maxime Coquelin

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=540965E7.7040302@st.com \
    --to=maxime.coquelin@st.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.