Re: [PATCH 2/2] gpio: etraxfs: add interrupt support

From: Linus Walleij
Date: Thu Aug 13 2015 - 04:57:58 EST


On Mon, Aug 3, 2015 at 7:30 PM, Rabin Vincent <rabin@xxxxxx> wrote:
> On Mon, Aug 03, 2015 at 11:34:23AM +0200, Linus Walleij wrote:
>> On Fri, Jul 31, 2015 at 2:48 PM, Rabin Vincent <rabin@xxxxxx> wrote:
>> > +static void etraxfs_gpio_irq_ack(struct irq_data *d)
>> > +{
>> > + struct etraxfs_gpio_chip *chip = irq_data_get_irq_chip_data(d);
>>
>> I don't see how this works in the irqchip functions.
>
> The offset of the gpio_chip embedded in etraxfs_gpio_chip is zero.
> There are a couple of other gpio drivers doing it the same way, but
> container_of() would certainly be more robust.

Aha hehe yeah that seems a bit fragile, I should take a sweep and
fix them all I guess.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/