summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/generic.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-03-17 23:06:01 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:34 -0700
commit1a1405e22563151de79fdc83aa5e5815d10f0291 (patch)
tree9fdad89cc2e34dbb4b5f1c5cd4b0f6ab9629a86d /drivers/usb/serial/generic.c
parent1b551015a10d6cf04f2f8e11f0ca534b261d2c55 (diff)
USB: serial: clean up some error and debug messages in generic driver
Clean up error messages on usb_submit_urb failure. Remove debug message on zero-length writes. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 789a5af842a9..63b43308e160 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -221,8 +221,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty,
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
- dev_err(&port->dev,
- "%s - failed submitting write urb, error %d\n",
+ dev_err(&port->dev, "%s - error submitting urb: %d\n",
__func__, status);
goto error;
}
@@ -285,8 +284,7 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port)
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
- dev_err(&port->dev,
- "%s - failed submitting write urb, error %d\n",
+ dev_err(&port->dev, "%s - error submitting urb: %d\n",
__func__, result);
/* don't have to grab the lock here, as we will
retry if != 0 */
@@ -324,10 +322,8 @@ int usb_serial_generic_write(struct tty_struct *tty,
if (!port->bulk_out_size)
return -ENODEV;
- if (count == 0) {
- dbg("%s - write request of 0 bytes", __func__);
+ if (!count)
return 0;
- }
if (serial->type->max_in_flight_urbs)
return usb_serial_multi_urb_write(tty, port,
@@ -400,8 +396,7 @@ int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
result = usb_submit_urb(port->read_urb, mem_flags);
if (result && result != -EPERM) {
- dev_err(&port->dev,
- "%s - failed submitting read urb, error %d\n",
+ dev_err(&port->dev, "%s - error submitting urb: %d\n",
__func__, result);
}
return result;