[PATCH 4/4] pinctrl: sirf: move to use irq_get_handler_data
Linus Walleij
linus.walleij at linaro.org
Thu Apr 24 05:59:54 PDT 2014
On Thu, Apr 24, 2014 at 12:59 AM, Barry Song <21cnbao at gmail.com> wrote:
>> If you want to use some other handler data than the gpiochip,
>> you should just use irq_set_chained_handler() and
>> irq_set_handler_data() directly.
>
> i think this should be fixed in the general API but not use one more
> function call to over-write the handler_data which has been filled in
> the API.
> since we have the chance for drivers to set either the whole chip for
> a simple chip, or bank-specific data for a chip which has multiple
> parent IRQs.
I don't think it's worth it for saving one line. The helper is intended
for the simple case, i.e. where it's enough to just get the gpio_chip
as handler data. Other alternatives need to be open coded.
I'm even considering removing this helper if it's confusing, it doesn't
really add much, gpiochip_irqchip_add() is the important function
to use, not gpiochip_set_chained_irqchip().
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list