HID cp2112: fix support for multiple gpiochips
authorDouglas Gilbert <dgilbert@interlog.com>
Sat, 9 Jan 2021 22:36:58 +0000 (17:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Apr 2021 11:40:01 +0000 (13:40 +0200)
commite913cbc952c300cd99ce40538b1c53438f9f7ffd
tree1235d1bf1e6dd67bab9e65d2ee33198b39ced5ea
parentf691dc86411d80005dcf26fedd5c95c834a9da09
HID cp2112: fix support for multiple gpiochips

[ Upstream commit 2a2b09c867fdac63f430a45051e7bd0c46edc381 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-cp2112.c