gpio: pcf857x: Fix interrupts on multiple instances
authorRoger Quadros <rogerq@ti.com>
Wed, 9 Jan 2019 09:11:24 +0000 (11:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:30:12 +0000 (17:30 +0100)
commit95fcc1427d7f80f96cec6362b9b601ef4353a000
tree4f40c0fbc02eed0545dac91f4babaeba77eac48f
parent452ad274c926c8a84e320ebeedd54a38a9e0b08f
gpio: pcf857x: Fix interrupts on multiple instances

commit 2486e67374aa8b7854c2de32869642c2873b3d53 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-pcf857x.c