summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-dbgtty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-dbgtty.c')
-rw-r--r--drivers/usb/host/xhci-dbgtty.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 9acf1efba36c..3231cec74a7a 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -455,6 +455,11 @@ void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
xhci_dbc_free_requests(&port->write_pool);
}
+static const struct dbc_driver dbc_driver = {
+ .configure = xhci_dbc_tty_register_device,
+ .disconnect = xhci_dbc_tty_unregister_device,
+};
+
int xhci_dbc_tty_probe(struct xhci_hcd *xhci)
{
struct xhci_dbc *dbc = xhci->dbc;
@@ -465,6 +470,8 @@ int xhci_dbc_tty_probe(struct xhci_hcd *xhci)
if (status)
return status;
+ dbc->driver = &dbc_driver;
+
dbc_tty_driver->driver_state = &dbc->port;
return 0;
@@ -481,6 +488,8 @@ out:
*/
void xhci_dbc_tty_remove(struct xhci_dbc *dbc)
{
+ dbc->driver = NULL;
+
/* dbc_tty_exit will be called by module_exit() in the future */
dbc_tty_exit();
}
@@ -523,5 +532,3 @@ static void dbc_tty_exit(void)
dbc_tty_driver = NULL;
}
}
-
-