summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-dbgtty.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2020-07-23 17:45:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-23 17:05:27 +0200
commitb396fa39de9b47ce3368f65d7d069c7176f26371 (patch)
treece157a5466220849b2322b1b37f228109827b963 /drivers/usb/host/xhci-dbgtty.c
parenta1f6376df494c2f96530c8f294b7a31053425cff (diff)
xhci: dbgtty: Pass dbc pointer when registering a dbctty device
Pass dbc pointer to the xhci_dbc_tty_register_device() and xhci_dbc_tty_unregister_device() functions instead of xhci_hcd pointer These functions don't need a xhci_hcd pointer anymore, only use case was the xhci_err() function, which is now changed to a dev_err() instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20200723144530.9992-16-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-dbgtty.c')
-rw-r--r--drivers/usb/host/xhci-dbgtty.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 9a1d38442578..545e8cb0221a 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -440,11 +440,10 @@ xhci_dbc_tty_exit_port(struct dbc_port *port)
tty_port_destroy(&port->port);
}
-int xhci_dbc_tty_register_device(struct xhci_hcd *xhci)
+int xhci_dbc_tty_register_device(struct xhci_dbc *dbc)
{
int ret;
struct device *tty_dev;
- struct xhci_dbc *dbc = xhci->dbc;
struct dbc_port *port = &dbc->port;
xhci_dbc_tty_init_port(xhci, port);
@@ -484,14 +483,13 @@ buf_alloc_fail:
register_fail:
xhci_dbc_tty_exit_port(port);
- xhci_err(xhci, "can't register tty port, err %d\n", ret);
+ dev_err(dbc->dev, "can't register tty port, err %d\n", ret);
return ret;
}
-void xhci_dbc_tty_unregister_device(struct xhci_hcd *xhci)
+void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc)
{
- struct xhci_dbc *dbc = xhci->dbc;
struct dbc_port *port = &dbc->port;
tty_unregister_device(dbc_tty_driver, 0);