diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-03-17 18:06:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:34 -0400 |
commit | 1a1405e22563151de79fdc83aa5e5815d10f0291 (patch) | |
tree | 9fdad89cc2e34dbb4b5f1c5cd4b0f6ab9629a86d /drivers/usb/serial/generic.c | |
parent | 1b551015a10d6cf04f2f8e11f0ca534b261d2c55 (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.c | 13 |
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, | |||
221 | 221 | ||
222 | status = usb_submit_urb(urb, GFP_ATOMIC); | 222 | status = usb_submit_urb(urb, GFP_ATOMIC); |
223 | if (status) { | 223 | if (status) { |
224 | dev_err(&port->dev, | 224 | dev_err(&port->dev, "%s - error submitting urb: %d\n", |
225 | "%s - failed submitting write urb, error %d\n", | ||
226 | __func__, status); | 225 | __func__, status); |
227 | goto error; | 226 | goto error; |
228 | } | 227 | } |
@@ -285,8 +284,7 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port) | |||
285 | /* send the data out the bulk port */ | 284 | /* send the data out the bulk port */ |
286 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 285 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
287 | if (result) { | 286 | if (result) { |
288 | dev_err(&port->dev, | 287 | dev_err(&port->dev, "%s - error submitting urb: %d\n", |
289 | "%s - failed submitting write urb, error %d\n", | ||
290 | __func__, result); | 288 | __func__, result); |
291 | /* don't have to grab the lock here, as we will | 289 | /* don't have to grab the lock here, as we will |
292 | retry if != 0 */ | 290 | retry if != 0 */ |
@@ -324,10 +322,8 @@ int usb_serial_generic_write(struct tty_struct *tty, | |||
324 | if (!port->bulk_out_size) | 322 | if (!port->bulk_out_size) |
325 | return -ENODEV; | 323 | return -ENODEV; |
326 | 324 | ||
327 | if (count == 0) { | 325 | if (!count) |
328 | dbg("%s - write request of 0 bytes", __func__); | ||
329 | return 0; | 326 | return 0; |
330 | } | ||
331 | 327 | ||
332 | if (serial->type->max_in_flight_urbs) | 328 | if (serial->type->max_in_flight_urbs) |
333 | return usb_serial_multi_urb_write(tty, port, | 329 | return usb_serial_multi_urb_write(tty, port, |
@@ -400,8 +396,7 @@ int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, | |||
400 | 396 | ||
401 | result = usb_submit_urb(port->read_urb, mem_flags); | 397 | result = usb_submit_urb(port->read_urb, mem_flags); |
402 | if (result && result != -EPERM) { | 398 | if (result && result != -EPERM) { |
403 | dev_err(&port->dev, | 399 | dev_err(&port->dev, "%s - error submitting urb: %d\n", |
404 | "%s - failed submitting read urb, error %d\n", | ||
405 | __func__, result); | 400 | __func__, result); |
406 | } | 401 | } |
407 | return result; | 402 | return result; |