mfd: Prevent STMPE from abusing mfd_add_devices' irq_base parameter
authorLee Jones <lee.jones@linaro.org>
Mon, 5 Nov 2012 15:10:30 +0000 (16:10 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 11 Nov 2012 22:35:03 +0000 (23:35 +0100)
commit7da0cbfc54c82eec793ff3d1b23b7a25406c6dba
tree59548dc5476e9e94f4c7d9ad7ed4f16414ad181b
parent8ae754ebd5edffa0b2a2bafa4879a9ace01d5477
mfd: Prevent STMPE from abusing mfd_add_devices' irq_base parameter

Originally IRQ incrementers were provided in some template resource
structures for keypad and touchscreen devices. These were passed as
IORESOURCE_IRQs to MFD core in the usual way. The true device IRQs
were instead added to the irq_base when mfd_add_devices was invoked.
This is clearly an abuse of the call, and does not scale when IRQ
Domains are brought into play. Before we can provide the STMPE with
its own IRQ Domain we must first fix this. This patche keeps most
of the driver's structure, keeping the template strategy. However,
instead of providing the IRQ as an increment to irq_base, we
dynamically populate the IORESOURCE_IRQ with the correct device IRQ.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/stmpe.c
This page took 0.034441 seconds and 5 git commands to generate.