xhci: dbgtty: use IDR to support several dbc instances.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 16 Feb 2022 09:51:49 +0000 (11:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Feb 2022 15:20:45 +0000 (16:20 +0100)
commite1ec140f273e1e30cea7e6d5f50934d877232121
tree1962340360dabcd5dc05d5432d87228368181ffa
parent6aec50009d52f28ef8b512cba0f5078b3928064d
xhci: dbgtty: use IDR to support several dbc instances.

To support systems with several xhci controllers with active
dbc on each xhci we need to use IDR to identify and give
an index to each port.

Avoid using global struct tty_driver.driver_state for storing
dbc port pointer as it won't work with several dbc ports

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220216095153.1303105-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-dbgcap.h
drivers/usb/host/xhci-dbgtty.c