gpio: dln2: Fix interrupts when replugging the device
authorNoralf Trønnes <noralf@tronnes.org>
Mon, 18 Oct 2021 11:22:01 +0000 (13:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:26:03 +0000 (12:26 +0100)
commit9a7ec7979785e97b33a6bbd79b95faa20e4882bb
tree41bdbd9bea8c896b0e26ae288fc75c5542ba5fe6
parentf5b02912e2dd89fe2386c19edd2c6f3e1296fc2b
gpio: dln2: Fix interrupts when replugging the device

commit 9a5875f14b0e3a13ae314883f1bb72b7f31fac07 upstream.

When replugging the device the following message shows up:

gpio gpiochip2: (dln2): detected irqchip that is shared with multiple gpiochips: please fix the driver.

This also has the effect that interrupts won't work.
The same problem would also show up if multiple devices where plugged in.

Fix this by allocating the irq_chip data structure per instance like other
drivers do.

I don't know when this problem appeared, but it is present in 5.10.

Cc: <stable@vger.kernel.org> # 5.10+
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-dln2.c