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>
This commit is contained in:
parent
1b551015a1
commit
1a1405e225
|
@ -221,8 +221,7 @@ static int usb_serial_multi_urb_write(struct tty_struct *tty,
|
||||||
|
|
||||||
status = usb_submit_urb(urb, GFP_ATOMIC);
|
status = usb_submit_urb(urb, GFP_ATOMIC);
|
||||||
if (status) {
|
if (status) {
|
||||||
dev_err(&port->dev,
|
dev_err(&port->dev, "%s - error submitting urb: %d\n",
|
||||||
"%s - failed submitting write urb, error %d\n",
|
|
||||||
__func__, status);
|
__func__, status);
|
||||||
goto error;
|
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 */
|
/* send the data out the bulk port */
|
||||||
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 - error submitting urb: %d\n",
|
||||||
"%s - failed submitting write urb, error %d\n",
|
|
||||||
__func__, result);
|
__func__, result);
|
||||||
/* don't have to grab the lock here, as we will
|
/* don't have to grab the lock here, as we will
|
||||||
retry if != 0 */
|
retry if != 0 */
|
||||||
|
@ -324,10 +322,8 @@ int usb_serial_generic_write(struct tty_struct *tty,
|
||||||
if (!port->bulk_out_size)
|
if (!port->bulk_out_size)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (count == 0) {
|
if (!count)
|
||||||
dbg("%s - write request of 0 bytes", __func__);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (serial->type->max_in_flight_urbs)
|
if (serial->type->max_in_flight_urbs)
|
||||||
return usb_serial_multi_urb_write(tty, port,
|
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);
|
result = usb_submit_urb(port->read_urb, mem_flags);
|
||||||
if (result && result != -EPERM) {
|
if (result && result != -EPERM) {
|
||||||
dev_err(&port->dev,
|
dev_err(&port->dev, "%s - error submitting urb: %d\n",
|
||||||
"%s - failed submitting read urb, error %d\n",
|
|
||||||
__func__, result);
|
__func__, result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue