gpio: pcf857x: Fix interrupts on multiple instances
authorRoger Quadros <rogerq@ti.com>
Wed, 9 Jan 2019 09:11:24 +0000 (11:11 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 23 Jan 2019 16:24:01 +0000 (17:24 +0100)
commit2486e67374aa8b7854c2de32869642c2873b3d53
tree8380ce7519e1adb4b31a58aef5ef4aedd268db7b
parent49a57857aeea06ca831043acbb0fa5e0f50602fd
gpio: pcf857x: Fix interrupts on multiple instances

When multiple instances of pcf857x chips are present, a fix up
message [1] is printed during the probe of the 2nd and later
instances.

The issue is that the driver is using the same irq_chip data
structure between multiple instances.

Fix this by allocating the irq_chip data structure per instance.

[1] fix up message addressed by this patch
[    1.212100] gpio gpiochip9: (pcf8575): detected irqchip that is shared with multiple gpiochips: please fix the driver.

Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-pcf857x.c