summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 12:36:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 13:42:13 -0700
commitd12e211d44844930b7460ffab43ff9b078a45369 (patch)
tree0ec13c5b07de86a9bbd7277d9d2cc2ece9ed9c53 /drivers/usb/serial/usb-serial.c
parent9993b42b638ec031a55bfe1bc16317cbb5c69722 (diff)
downloadblackbird-op-linux-d12e211d44844930b7460ffab43ff9b078a45369.tar.gz
blackbird-op-linux-d12e211d44844930b7460ffab43ff9b078a45369.zip
USB: serial: clean up debug info
Remove redundant port number from debug output (already printed as part of device name). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 262beefca71e..fee8d8a04f7b 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -247,7 +247,8 @@ static int serial_open(struct tty_struct *tty, struct file *filp)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
+
return tty_port_open(&port->port, tty, filp);
}
@@ -275,7 +276,8 @@ static void serial_hangup(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
+
tty_port_hangup(&port->port);
}
@@ -283,7 +285,8 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
+
tty_port_close(&port->port, tty, filp);
}
@@ -302,14 +305,14 @@ static void serial_cleanup(struct tty_struct *tty)
struct usb_serial *serial;
struct module *owner;
+ dev_dbg(tty->dev, "%s\n", __func__);
+
/* The console is magical. Do not hang up the console hardware
* or there will be tears.
*/
if (port->port.console)
return;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
-
tty->driver_data = NULL;
serial = port->serial;
@@ -333,8 +336,7 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf,
if (port->serial->dev->state == USB_STATE_NOTATTACHED)
goto exit;
- dev_dbg(tty->dev, "%s - port %d, %d byte(s)\n", __func__,
- port->number, count);
+ dev_dbg(tty->dev, "%s - %d byte(s)\n", __func__, count);
retval = port->serial->type->write(tty, port, buf, count);
if (retval < 0)
@@ -347,7 +349,7 @@ static int serial_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
return port->serial->type->write_room(tty);
}
@@ -358,7 +360,7 @@ static int serial_chars_in_buffer(struct tty_struct *tty)
struct usb_serial *serial = port->serial;
int count = 0;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
mutex_lock(&serial->disc_mutex);
/* if the device was unplugged then any remaining characters
@@ -376,7 +378,7 @@ static void serial_throttle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->throttle)
port->serial->type->throttle(tty);
@@ -386,7 +388,7 @@ static void serial_unthrottle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->unthrottle)
port->serial->type->unthrottle(tty);
@@ -398,8 +400,7 @@ static int serial_ioctl(struct tty_struct *tty,
struct usb_serial_port *port = tty->driver_data;
int retval = -ENODEV;
- dev_dbg(tty->dev, "%s - port %d, cmd 0x%.4x\n", __func__,
- port->number, cmd);
+ dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd);
if (port->serial->type->ioctl)
retval = port->serial->type->ioctl(tty, cmd, arg);
@@ -413,7 +414,7 @@ static void serial_set_termios(struct tty_struct *tty, struct ktermios *old)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->set_termios)
port->serial->type->set_termios(tty, port, old);
@@ -425,7 +426,7 @@ static int serial_break(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->break_ctl)
port->serial->type->break_ctl(tty, break_state);
@@ -483,7 +484,7 @@ static int serial_tiocmget(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->tiocmget)
return port->serial->type->tiocmget(tty);
@@ -495,7 +496,7 @@ static int serial_tiocmset(struct tty_struct *tty,
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->tiocmset)
return port->serial->type->tiocmset(tty, set, clear);
@@ -507,7 +508,7 @@ static int serial_get_icount(struct tty_struct *tty,
{
struct usb_serial_port *port = tty->driver_data;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
if (port->serial->type->get_icount)
return port->serial->type->get_icount(tty, icount);
@@ -535,7 +536,7 @@ static void usb_serial_port_work(struct work_struct *work)
if (!tty)
return;
- dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number);
+ dev_dbg(tty->dev, "%s\n", __func__);
tty_wakeup(tty);
tty_kref_put(tty);
OpenPOWER on IntegriCloud