Commit d9a38a87 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: add missing newlines to dev_<level> messages.

Add missing newlines to dev_<level> messages.

Also make some messages less verbose where appropriate.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ca0400d2
...@@ -323,11 +323,11 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -323,11 +323,11 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
if (r) if (r)
goto out; goto out;
dev_dbg(&port->dev, "%s - submitting interrupt urb", __func__); dev_dbg(&port->dev, "%s - submitting interrupt urb\n", __func__);
r = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); r = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (r) { if (r) {
dev_err(&port->dev, "%s - failed submitting interrupt urb," dev_err(&port->dev, "%s - failed to submit interrupt urb: %d\n",
" error %d\n", __func__, r); __func__, r);
ch341_close(port); ch341_close(port);
goto out; goto out;
} }
......
...@@ -220,7 +220,7 @@ static int cyberjack_write(struct tty_struct *tty, ...@@ -220,7 +220,7 @@ static int cyberjack_write(struct tty_struct *tty,
result = usb_submit_urb(port->write_urb, GFP_ATOMIC); result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) { if (result) {
dev_err(&port->dev, dev_err(&port->dev,
"%s - failed submitting write urb, error %d", "%s - failed submitting write urb, error %d\n",
__func__, result); __func__, result);
/* Throw away data. No better idea what to do with it. */ /* Throw away data. No better idea what to do with it. */
priv->wrfilled = 0; priv->wrfilled = 0;
......
...@@ -279,7 +279,7 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate) ...@@ -279,7 +279,7 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
* the generic firmware, but are not used with * the generic firmware, but are not used with
* NMEA and SiRF protocols */ * NMEA and SiRF protocols */
dev_dbg(&port->dev, dev_dbg(&port->dev,
"%s - failed setting baud rate, unsupported speed of %d on Earthmate GPS", "%s - failed setting baud rate, unsupported speed of %d on Earthmate GPS\n",
__func__, new_rate); __func__, new_rate);
return -1; return -1;
} }
......
...@@ -1151,7 +1151,7 @@ static ssize_t vcc_mode_store(struct device *dev, ...@@ -1151,7 +1151,7 @@ static ssize_t vcc_mode_store(struct device *dev,
goto fail_store_vcc_mode; goto fail_store_vcc_mode;
} }
dev_dbg(dev, "%s: setting vcc_mode = %ld", __func__, v); dev_dbg(dev, "%s: setting vcc_mode = %ld\n", __func__, v);
if ((v != 3) && (v != 5)) { if ((v != 3) && (v != 5)) {
dev_err(dev, "%s - vcc_mode %ld is invalid\n", __func__, v); dev_err(dev, "%s - vcc_mode %ld is invalid\n", __func__, v);
......
...@@ -189,7 +189,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb) ...@@ -189,7 +189,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
dev_err(&port->dev, dev_err(&port->dev,
"%s - usb_submit_urb failed with result %d", "%s - usb_submit_urb failed with result %d\n",
__func__, retval); __func__, retval);
} }
......
...@@ -201,7 +201,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, ...@@ -201,7 +201,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
else { else {
status = get_unaligned_le16(status_buf); status = get_unaligned_le16(status_buf);
dev_info(&port->serial->dev->dev, "read status %x %x", dev_info(&port->serial->dev->dev, "read status %x %x\n",
status_buf[0], status_buf[1]); status_buf[0], status_buf[1]);
*line_state_p = klsi_105_status2linestate(status); *line_state_p = klsi_105_status2linestate(status);
...@@ -464,7 +464,7 @@ static void klsi_105_set_termios(struct tty_struct *tty, ...@@ -464,7 +464,7 @@ static void klsi_105_set_termios(struct tty_struct *tty,
priv->cfg.baudrate = kl5kusb105a_sio_b115200; priv->cfg.baudrate = kl5kusb105a_sio_b115200;
break; break;
default: default:
dev_dbg(dev, "KLSI USB->Serial converter: unsupported baudrate request, using default of 9600"); dev_dbg(dev, "unsupported baudrate, using 9600\n");
priv->cfg.baudrate = kl5kusb105a_sio_b9600; priv->cfg.baudrate = kl5kusb105a_sio_b9600;
baud = 9600; baud = 9600;
break; break;
......
...@@ -557,7 +557,8 @@ static int kobil_ioctl(struct tty_struct *tty, ...@@ -557,7 +557,8 @@ static int kobil_ioctl(struct tty_struct *tty,
); );
dev_dbg(&port->dev, dev_dbg(&port->dev,
"%s - Send reset_all_queues (FLUSH) URB returns: %i", __func__, result); "%s - Send reset_all_queues (FLUSH) URB returns: %i\n",
__func__, result);
kfree(transfer_buffer); kfree(transfer_buffer);
return (result < 0) ? -EIO: 0; return (result < 0) ? -EIO: 0;
default: default:
......
...@@ -209,7 +209,7 @@ static int write_mos_reg(struct usb_serial *serial, unsigned int serial_portnum, ...@@ -209,7 +209,7 @@ static int write_mos_reg(struct usb_serial *serial, unsigned int serial_portnum,
index, NULL, 0, MOS_WDR_TIMEOUT); index, NULL, 0, MOS_WDR_TIMEOUT);
if (status < 0) if (status < 0)
dev_err(&usbdev->dev, dev_err(&usbdev->dev,
"mos7720: usb_control_msg() failed: %d", status); "mos7720: usb_control_msg() failed: %d\n", status);
return status; return status;
} }
...@@ -240,7 +240,7 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum, ...@@ -240,7 +240,7 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum,
*data = *buf; *data = *buf;
else if (status < 0) else if (status < 0)
dev_err(&usbdev->dev, dev_err(&usbdev->dev,
"mos7720: usb_control_msg() failed: %d", status); "mos7720: usb_control_msg() failed: %d\n", status);
kfree(buf); kfree(buf);
return status; return status;
...@@ -399,7 +399,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport, ...@@ -399,7 +399,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
&mos_parport->deferred_urbs); &mos_parport->deferred_urbs);
spin_unlock_irqrestore(&mos_parport->listlock, flags); spin_unlock_irqrestore(&mos_parport->listlock, flags);
tasklet_schedule(&mos_parport->urb_tasklet); tasklet_schedule(&mos_parport->urb_tasklet);
dev_dbg(&usbdev->dev, "tasklet scheduled"); dev_dbg(&usbdev->dev, "tasklet scheduled\n");
return 0; return 0;
} }
...@@ -418,7 +418,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport, ...@@ -418,7 +418,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
mutex_unlock(&serial->disc_mutex); mutex_unlock(&serial->disc_mutex);
if (ret_val) { if (ret_val) {
dev_err(&usbdev->dev, dev_err(&usbdev->dev,
"%s: submit_urb() failed: %d", __func__, ret_val); "%s: submit_urb() failed: %d\n", __func__, ret_val);
spin_lock_irqsave(&mos_parport->listlock, flags); spin_lock_irqsave(&mos_parport->listlock, flags);
list_del(&urbtrack->urblist_entry); list_del(&urbtrack->urblist_entry);
spin_unlock_irqrestore(&mos_parport->listlock, flags); spin_unlock_irqrestore(&mos_parport->listlock, flags);
...@@ -656,7 +656,7 @@ static size_t parport_mos7715_write_compat(struct parport *pp, ...@@ -656,7 +656,7 @@ static size_t parport_mos7715_write_compat(struct parport *pp,
parport_epilogue(pp); parport_epilogue(pp);
if (retval) { if (retval) {
dev_err(&mos_parport->serial->dev->dev, dev_err(&mos_parport->serial->dev->dev,
"mos7720: usb_bulk_msg() failed: %d", retval); "mos7720: usb_bulk_msg() failed: %d\n", retval);
return 0; return 0;
} }
return actual_len; return actual_len;
...@@ -875,7 +875,7 @@ static void mos7715_interrupt_callback(struct urb *urb) ...@@ -875,7 +875,7 @@ static void mos7715_interrupt_callback(struct urb *urb)
if (!(iir & 0x01)) { /* serial port interrupt pending */ if (!(iir & 0x01)) { /* serial port interrupt pending */
switch (iir & 0x0f) { switch (iir & 0x0f) {
case SERIAL_IIR_RLS: case SERIAL_IIR_RLS:
dev_dbg(dev, "Serial Port: Receiver status error or address bit detected in 9-bit mode\n\n"); dev_dbg(dev, "Serial Port: Receiver status error or address bit detected in 9-bit mode\n");
break; break;
case SERIAL_IIR_CTI: case SERIAL_IIR_CTI:
dev_dbg(dev, "Serial Port: Receiver time out\n"); dev_dbg(dev, "Serial Port: Receiver time out\n");
......
...@@ -522,11 +522,11 @@ static void mos7840_set_led_callback(struct urb *urb) ...@@ -522,11 +522,11 @@ static void mos7840_set_led_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
/* This urb is terminated, clean up */ /* This urb is terminated, clean up */
dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d", dev_dbg(&urb->dev->dev, "%s - urb shutting down: %d\n",
__func__, urb->status); __func__, urb->status);
break; break;
default: default:
dev_dbg(&urb->dev->dev, "%s - nonzero urb status received: %d", dev_dbg(&urb->dev->dev, "%s - nonzero urb status: %d\n",
__func__, urb->status); __func__, urb->status);
} }
} }
......
...@@ -372,7 +372,7 @@ static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -372,7 +372,7 @@ static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port)
device_port, data, 2, QT2_USB_TIMEOUT); device_port, data, 2, QT2_USB_TIMEOUT);
if (status < 0) { if (status < 0) {
dev_err(&port->dev, "%s - open port failed %i", __func__, dev_err(&port->dev, "%s - open port failed %i\n", __func__,
status); status);
kfree(data); kfree(data);
return status; return status;
......
...@@ -220,9 +220,9 @@ static int spcp8x5_get_msr(struct usb_serial_port *port, u8 *status) ...@@ -220,9 +220,9 @@ static int spcp8x5_get_msr(struct usb_serial_port *port, u8 *status)
GET_UART_STATUS, GET_UART_STATUS_TYPE, GET_UART_STATUS, GET_UART_STATUS_TYPE,
0, GET_UART_STATUS_MSR, buf, 1, 100); 0, GET_UART_STATUS_MSR, buf, 1, 100);
if (ret < 0) if (ret < 0)
dev_err(&port->dev, "failed to get modem status: %d", ret); dev_err(&port->dev, "failed to get modem status: %d\n", ret);
dev_dbg(&port->dev, "0xc0:0x22:0:6 %d - 0x02%x", ret, *buf); dev_dbg(&port->dev, "0xc0:0x22:0:6 %d - 0x02%x\n", ret, *buf);
*status = *buf; *status = *buf;
kfree(buf); kfree(buf);
...@@ -342,8 +342,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty, ...@@ -342,8 +342,7 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
case 1000000: case 1000000:
buf[0] = 0x0b; break; buf[0] = 0x0b; break;
default: default:
dev_err(&port->dev, "spcp825 driver does not support the " dev_err(&port->dev, "unsupported baudrate, using 9600\n");
"baudrate requested, using default of 9600.\n");
} }
/* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */ /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */
......
...@@ -74,9 +74,7 @@ static void symbol_int_callback(struct urb *urb) ...@@ -74,9 +74,7 @@ static void symbol_int_callback(struct urb *urb)
tty_insert_flip_string(&port->port, &data[1], data_length); tty_insert_flip_string(&port->port, &data[1], data_length);
tty_flip_buffer_push(&port->port); tty_flip_buffer_push(&port->port);
} else { } else {
dev_dbg(&port->dev, dev_dbg(&port->dev, "%s - short packet\n", __func__);
"Improper amount of data received from the device, "
"%d bytes", urb->actual_length);
} }
exit: exit:
......
...@@ -293,7 +293,7 @@ static int ti_startup(struct usb_serial *serial) ...@@ -293,7 +293,7 @@ static int ti_startup(struct usb_serial *serial)
int status; int status;
dev_dbg(&dev->dev, dev_dbg(&dev->dev,
"%s - product 0x%4X, num configurations %d, configuration value %d", "%s - product 0x%4X, num configurations %d, configuration value %d\n",
__func__, le16_to_cpu(dev->descriptor.idProduct), __func__, le16_to_cpu(dev->descriptor.idProduct),
dev->descriptor.bNumConfigurations, dev->descriptor.bNumConfigurations,
dev->actconfig->desc.bConfigurationValue); dev->actconfig->desc.bConfigurationValue);
...@@ -803,7 +803,7 @@ static void ti_set_termios(struct tty_struct *tty, ...@@ -803,7 +803,7 @@ static void ti_set_termios(struct tty_struct *tty,
tty_encode_baud_rate(tty, baud, baud); tty_encode_baud_rate(tty, baud, baud);
dev_dbg(&port->dev, dev_dbg(&port->dev,
"%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d", "%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d\n",
__func__, baud, config->wBaudRate, config->wFlags, __func__, baud, config->wBaudRate, config->wFlags,
config->bDataBits, config->bParity, config->bStopBits, config->bDataBits, config->bParity, config->bStopBits,
config->cXon, config->cXoff, config->bUartMode); config->cXon, config->cXoff, config->bUartMode);
......
...@@ -868,7 +868,7 @@ static int usb_serial_probe(struct usb_interface *interface, ...@@ -868,7 +868,7 @@ static int usb_serial_probe(struct usb_interface *interface,
max_endpoints = max(max_endpoints, (int)serial->num_ports); max_endpoints = max(max_endpoints, (int)serial->num_ports);
serial->num_port_pointers = max_endpoints; serial->num_port_pointers = max_endpoints;
dev_dbg(ddev, "setting up %d port structures for this device", max_endpoints); dev_dbg(ddev, "setting up %d port structure(s)\n", max_endpoints);
for (i = 0; i < max_endpoints; ++i) { for (i = 0; i < max_endpoints; ++i) {
port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
if (!port) if (!port)
...@@ -1033,7 +1033,7 @@ static int usb_serial_probe(struct usb_interface *interface, ...@@ -1033,7 +1033,7 @@ static int usb_serial_probe(struct usb_interface *interface,
for (i = 0; i < num_ports; ++i) { for (i = 0; i < num_ports; ++i) {
port = serial->port[i]; port = serial->port[i];
dev_set_name(&port->dev, "ttyUSB%d", port->minor); dev_set_name(&port->dev, "ttyUSB%d", port->minor);
dev_dbg(ddev, "registering %s", dev_name(&port->dev)); dev_dbg(ddev, "registering %s\n", dev_name(&port->dev));
device_enable_async_suspend(&port->dev); device_enable_async_suspend(&port->dev);
retval = device_add(&port->dev); retval = device_add(&port->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment