summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-dbgcap.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2022-02-16 12:51:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-17 18:20:45 +0300
commit6aec50009d52f28ef8b512cba0f5078b3928064d (patch)
tree64584ee64d7d09bd1408cbb4da784519091f1dc9 /drivers/usb/host/xhci-dbgcap.h
parent5c44d9d7570b244ca08fef817c4c90aa7a1f1b5f (diff)
downloadlinux-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.h')
-rw-r--r--drivers/usb/host/xhci-dbgcap.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.h b/drivers/usb/host/xhci-dbgcap.h
index 8b5b363a0719..5f3304a06591 100644
--- a/drivers/usb/host/xhci-dbgcap.h
+++ b/drivers/usb/host/xhci-dbgcap.h
@@ -196,6 +196,10 @@ static inline struct dbc_ep *get_out_ep(struct xhci_dbc *dbc)
#ifdef CONFIG_USB_XHCI_DBGCAP
int xhci_create_dbc_dev(struct xhci_hcd *xhci);
void xhci_remove_dbc_dev(struct xhci_hcd *xhci);
+int xhci_dbc_init(void);
+void xhci_dbc_exit(void);
+int dbc_tty_init(void);
+void dbc_tty_exit(void);
int xhci_dbc_tty_probe(struct device *dev, void __iomem *res, struct xhci_hcd *xhci);
void xhci_dbc_tty_remove(struct xhci_dbc *dbc);
struct xhci_dbc *xhci_alloc_dbc(struct device *dev, void __iomem *res,
@@ -219,7 +223,13 @@ static inline int xhci_create_dbc_dev(struct xhci_hcd *xhci)
static inline void xhci_remove_dbc_dev(struct xhci_hcd *xhci)
{
}
-
+static inline int xhci_dbc_init(void)
+{
+ return 0;
+}
+static inline void xhci_dbc_exit(void)
+{
+}
static inline int xhci_dbc_suspend(struct xhci_hcd *xhci)
{
return 0;