HID cp2112: fix support for multiple gpiochips
authorDouglas Gilbert <dgilbert@interlog.com>
Sat, 9 Jan 2021 22:36:58 +0000 (17:36 -0500)
committerJiri Kosina <jkosina@suse.cz>
Mon, 8 Mar 2021 13:55:31 +0000 (14:55 +0100)
commit2a2b09c867fdac63f430a45051e7bd0c46edc381
treef62e8fb9062de01c21b4400588d1e7d8e7af4e8c
parentfa8ba6e5dc0e78e409e503ddcfceef5dd96527f4
HID cp2112: fix support for multiple gpiochips

In lk 5.11.0-rc2 connecting a USB based Silicon Labs HID to I2C
bridge evaluation board (CP2112EK) causes this warning:
  gpio gpiochip0: (cp2112_gpio): detected irqchip that is shared
       with multiple gpiochips: please fix the driver

Simply copy what other gpio related drivers do to fix this
particular warning: replicate the struct irq_chip object in each
device instance rather than have a static object which makes that
object (incorrectly) shared by each device.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-cp2112.c