diff mbox

[v4,1/6] gpio: davinci: Fixed a check for unbanked gpio

Message ID 1383406775-14902-2-git-send-email-prabhakar.csenng@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lad, Prabhakar Nov. 2, 2013, 3:39 p.m. UTC
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>

This patch fixes the check for the offset in
gpio_to_irq_unbanked() function.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/gpio/gpio-davinci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Nov. 5, 2013, 12:39 p.m. UTC | #1
On Sat, Nov 2, 2013 at 4:39 PM, Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:

> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> This patch fixes the check for the offset in
> gpio_to_irq_unbanked() function.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Is this a regression that should go in right now?

Yours,
Linus Walleij
Lad, Prabhakar Nov. 6, 2013, 9:33 a.m. UTC | #2
Hi Linus,

On Tue, Nov 5, 2013 at 6:09 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Sat, Nov 2, 2013 at 4:39 PM, Lad, Prabhakar
> <prabhakar.csengg@gmail.com> wrote:
>
>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>
>> This patch fixes the check for the offset in
>> gpio_to_irq_unbanked() function.
>>
>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>
> Is this a regression that should go in right now?
>
Yes it needs too.

Regards,
--Prabhakar Lad
Linus Walleij Nov. 6, 2013, 9:56 a.m. UTC | #3
On Wed, Nov 6, 2013 at 10:33 AM, Prabhakar Lad
<prabhakar.csengg@gmail.com> wrote:
> On Tue, Nov 5, 2013 at 6:09 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Sat, Nov 2, 2013 at 4:39 PM, Lad, Prabhakar
>> <prabhakar.csengg@gmail.com> wrote:
>>
>>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>>
>>> This patch fixes the check for the offset in
>>> gpio_to_irq_unbanked() function.
>>>
>>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>>
>> Is this a regression that should go in right now?
>>
> Yes it needs too.

But on top of *what* exactly?

This does not apply to my gpio tree devel branch and
not even on the mainline kernel.

Is this something that should go on top of the davinci
GPIO patch set that is still being elaborated on?

Yours,
Linus Walleij
Lad, Prabhakar Nov. 6, 2013, 10:15 a.m. UTC | #4
Hi Linus,

On Wed, Nov 6, 2013 at 3:26 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Nov 6, 2013 at 10:33 AM, Prabhakar Lad
> <prabhakar.csengg@gmail.com> wrote:
>> On Tue, Nov 5, 2013 at 6:09 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>> On Sat, Nov 2, 2013 at 4:39 PM, Lad, Prabhakar
>>> <prabhakar.csengg@gmail.com> wrote:
>>>
>>>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>>>
>>>> This patch fixes the check for the offset in
>>>> gpio_to_irq_unbanked() function.
>>>>
>>>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>>>
>>> Is this a regression that should go in right now?
>>>
>> Yes it needs too.
>
> But on top of *what* exactly?
>
> This does not apply to my gpio tree devel branch and
> not even on the mainline kernel.
>
Looks like this needs to go via ARM tree as the earlier
patches have  gone via ARM tree itself [1].
If you can ACK it Sekhar can get it in via ARM tree.

> Is this something that should go on top of the davinci
> GPIO patch set that is still being elaborated on?
>
Nope.

[1]  http://www.spinics.net/lists/arm-kernel/msg275267.html

Regards,
--Prabhakar Lad
Sekhar Nori Nov. 6, 2013, 10:49 a.m. UTC | #5
On Wednesday 06 November 2013 03:45 PM, Prabhakar Lad wrote:
> Hi Linus,
> 
> On Wed, Nov 6, 2013 at 3:26 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Wed, Nov 6, 2013 at 10:33 AM, Prabhakar Lad
>> <prabhakar.csengg@gmail.com> wrote:
>>> On Tue, Nov 5, 2013 at 6:09 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>>> On Sat, Nov 2, 2013 at 4:39 PM, Lad, Prabhakar
>>>> <prabhakar.csengg@gmail.com> wrote:
>>>>
>>>>> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>>>>>
>>>>> This patch fixes the check for the offset in
>>>>> gpio_to_irq_unbanked() function.
>>>>>
>>>>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>>>>
>>>> Is this a regression that should go in right now?
>>>>
>>> Yes it needs too.
>>
>> But on top of *what* exactly?
>>
>> This does not apply to my gpio tree devel branch and
>> not even on the mainline kernel.
>>
> Looks like this needs to go via ARM tree as the earlier
> patches have  gone via ARM tree itself [1].
> If you can ACK it Sekhar can get it in via ARM tree.

The dependent patches are all in linux-next through ARM SoC queued for
v3.13 merge. This fix can either be sent late in merge cycle once Linus
has pulled ARM SoC or after v3.13-rc1 comes out.

Thanks,
Sekhar
Linus Walleij Nov. 6, 2013, 11:36 a.m. UTC | #6
On Wed, Nov 6, 2013 at 11:15 AM, Prabhakar Lad
<prabhakar.csengg@gmail.com> wrote:
> On Wed, Nov 6, 2013 at 3:26 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

>> This does not apply to my gpio tree devel branch and
>> not even on the mainline kernel.
>>
> Looks like this needs to go via ARM tree as the earlier
> patches have  gone via ARM tree itself [1].
> If you can ACK it Sekhar can get it in via ARM tree.

Aha OK.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 8847adf..6c90cfb 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -327,7 +327,7 @@  static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
 	 * NOTE:  we assume for now that only irqs in the first gpio_chip
 	 * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
 	 */
-	if (offset < d->irq_base)
+	if (offset < d->gpio_unbanked)
 		return d->gpio_irq + offset;
 	else
 		return -ENODEV;