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>
This commit is contained in:
Johan Hovold 2013-03-21 12:36:25 +01:00 committed by Greg Kroah-Hartman
parent 9993b42b63
commit d12e211d44

View file

@ -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);