Converts some info and debug messages into errors ones, and also adds missing errors reports.
Those messages cannot be hiding/omited, otherwise we could run in trouble in silence. Signed-off-by: Luiz Fernando N. Capitulino <[EMAIL PROTECTED]> --- drivers/usb/serial/usb-serial.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 5d028c6..b338c3f 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -652,7 +652,9 @@ int usb_serial_probe(struct usb_interfac module_put(type->driver.owner); if (retval) { - dbg ("sub driver rejected device"); + dev_err(&interface->dev, + "sub driver probe function failed with %d", + retval); kfree (serial); return retval; } @@ -724,7 +726,7 @@ #if defined(CONFIG_USB_SERIAL_PL2303) || * properly during a later invocation of usb_serial_probe */ if (num_bulk_in == 0 || num_bulk_out == 0) { - dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); + dev_err(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n"); kfree (serial); return -ENODEV; } @@ -783,8 +785,10 @@ #endif dbg("setting up %d port structures for this device", max_endpoints); for (i = 0; i < max_endpoints; ++i) { port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); - if (!port) + if (!port) { + dev_err(&interface->dev, "Couldn't allocate memory"); goto probe_error; + } port->number = i + serial->minor; port->serial = serial; spin_lock_init(&port->lock); @@ -866,7 +870,8 @@ #endif endpoint->bInterval); } } else if (num_interrupt_in) { - dbg("the device claims to support interrupt in transfers, but read_int_callback is not defined"); + dev_info(&interface->dev, + "the device claims to support interrupt in transfers, but read_int_callback is not defined"); } if (serial->type->write_int_callback) { @@ -894,7 +899,8 @@ #endif endpoint->bInterval); } } else if (num_interrupt_out) { - dbg("the device claims to support interrupt out transfers, but write_int_callback is not defined"); + dev_info(&interface->dev, + "the device claims to support interrupt out transfers, but write_int_callback is not defined"); } /* if this device type has an attach function, call it */ @@ -905,8 +911,11 @@ #endif } retval = type->attach (serial); module_put(type->driver.owner); - if (retval < 0) + if (retval < 0) { + dev_err(&interface->dev, + "sub driver attach failed with %d", retval); goto probe_error; + } if (retval > 0) { /* quietly accept this device, but don't bind to a serial port * as it's about to disappear */ -- 1.3.3.g0825d _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel