aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/metro-usb.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-04-08 17:08:59 +0200
committerJohan Hovold <johan@kernel.org>2021-04-09 17:55:21 +0200
commit07125072b0a08a13331b46990ea48997fa0c64b4 (patch)
treeff112a2392265c25e91f21c84045d90b00e6f9c1 /drivers/usb/serial/metro-usb.c
parentUSB: serial: io_edgeport: drop unused definitions (diff)
downloadlinux-dev-07125072b0a08a13331b46990ea48997fa0c64b4.tar.xz
linux-dev-07125072b0a08a13331b46990ea48997fa0c64b4.zip
USB: serial: do not use tty class device for debugging
Use the port struct device rather than tty class device for debugging. Note that while USB serial doesn't support serdev yet (due to serdev not handling hotplugging), serdev ttys do not have a corresponding class device and would have been logged using a "(NULL device *):" prefix. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/metro-usb.c')
-rw-r--r--drivers/usb/serial/metro-usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 0bfe4459c37f..f9ce9e7b9b80 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -299,7 +299,7 @@ static int metrousb_tiocmset(struct tty_struct *tty,
unsigned long flags = 0;
unsigned long control_state = 0;
- dev_dbg(tty->dev, "%s - set=%d, clear=%d\n", __func__, set, clear);
+ dev_dbg(&port->dev, "%s - set=%d, clear=%d\n", __func__, set, clear);
spin_lock_irqsave(&metro_priv->lock, flags);
control_state = metro_priv->control_state;
@@ -334,7 +334,7 @@ static void metrousb_unthrottle(struct tty_struct *tty)
/* Submit the urb to read from the port. */
result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
if (result)
- dev_err(tty->dev,
+ dev_err(&port->dev,
"failed submitting interrupt in urb error code=%d\n",
result);
}