diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2022-02-16 12:51:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-17 18:20:45 +0300 |
commit | 6aec50009d52f28ef8b512cba0f5078b3928064d (patch) | |
tree | 64584ee64d7d09bd1408cbb4da784519091f1dc9 /drivers/usb/host/xhci-dbgcap.c | |
parent | 5c44d9d7570b244ca08fef817c4c90aa7a1f1b5f (diff) | |
download | linux-6aec50009d52f28ef8b512cba0f5078b3928064d.tar.xz |
xhci: dbc: Don't call dbc_tty_init() on every dbc tty probe
The current workaround to call the dbc_tty_init() in probe is
not working in case we have several xhci devices with dbc enabled.
dbc_tty_init() should be called only once by a module init call when
module is loaded.
until dbgtty is its own module call dbc_tty_init() from xhci
module init call.
Same is true for unloading and dbc_tty_exit()
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220216095153.1303105-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-dbgcap.c')
-rw-r--r-- | drivers/usb/host/xhci-dbgcap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 46c8f3c187f7..e61155fa6379 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -1087,3 +1087,13 @@ int xhci_dbc_resume(struct xhci_hcd *xhci) return ret; } #endif /* CONFIG_PM */ + +int xhci_dbc_init(void) +{ + return dbc_tty_init(); +} + +void xhci_dbc_exit(void) +{ + dbc_tty_exit(); +} |