aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/safe_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/safe_serial.c')
-rw-r--r--drivers/usb/serial/safe_serial.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 72903ac9f5c0..4b463cd140ef 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -250,17 +250,18 @@ static void safe_read_bulk_callback(struct urb *urb)
250 if (!fcs) { 250 if (!fcs) {
251 int actual_length = data[length - 2] >> 2; 251 int actual_length = data[length - 2] >> 2;
252 if (actual_length <= (length - 2)) { 252 if (actual_length <= (length - 2)) {
253 info("%s - actual: %d", __func__, 253 dev_info(&urb->dev->dev, "%s - actual: %d\n",
254 actual_length); 254 __func__, actual_length);
255 tty_insert_flip_string(tty, 255 tty_insert_flip_string(tty,
256 data, actual_length); 256 data, actual_length);
257 tty_flip_buffer_push(tty); 257 tty_flip_buffer_push(tty);
258 } else { 258 } else {
259 err("%s - inconsistent lengths %d:%d", 259 dev_err(&port->dev,
260 "%s - inconsistent lengths %d:%d\n",
260 __func__, actual_length, length); 261 __func__, actual_length, length);
261 } 262 }
262 } else { 263 } else {
263 err("%s - bad CRC %x", __func__, fcs); 264 dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs);
264 } 265 }
265 } else { 266 } else {
266 tty_insert_flip_string(tty, data, length); 267 tty_insert_flip_string(tty, data, length);
@@ -277,8 +278,9 @@ static void safe_read_bulk_callback(struct urb *urb)
277 278
278 result = usb_submit_urb(urb, GFP_ATOMIC); 279 result = usb_submit_urb(urb, GFP_ATOMIC);
279 if (result) 280 if (result)
280 err("%s - failed resubmitting read urb, error %d", 281 dev_err(&port->dev,
281 __func__, result); 282 "%s - failed resubmitting read urb, error %d\n",
283 __func__, result);
282 /* FIXME: Need a mechanism to retry later if this happens */ 284 /* FIXME: Need a mechanism to retry later if this happens */
283} 285}
284 286
@@ -369,8 +371,9 @@ static int safe_write(struct tty_struct *tty, struct usb_serial_port *port,
369 result = usb_submit_urb(port->write_urb, GFP_KERNEL); 371 result = usb_submit_urb(port->write_urb, GFP_KERNEL);
370 if (result) { 372 if (result) {
371 port->write_urb_busy = 0; 373 port->write_urb_busy = 0;
372 err("%s - failed submitting write urb, error %d", 374 dev_err(&port->dev,
373 __func__, result); 375 "%s - failed submitting write urb, error %d\n",
376 __func__, result);
374 return 0; 377 return 0;
375 } 378 }
376 dbg("%s urb: %p submitted", __func__, port->write_urb); 379 dbg("%s urb: %p submitted", __func__, port->write_urb);
@@ -428,14 +431,13 @@ static int __init safe_init(void)
428{ 431{
429 int i, retval; 432 int i, retval;
430 433
431 info(DRIVER_VERSION " " DRIVER_AUTHOR); 434 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
432 info(DRIVER_DESC); 435 DRIVER_DESC "\n");
433 info("vendor: %x product: %x safe: %d padded: %d\n",
434 vendor, product, safe, padded);
435 436
436 /* if we have vendor / product parameters patch them into id list */ 437 /* if we have vendor / product parameters patch them into id list */
437 if (vendor || product) { 438 if (vendor || product) {
438 info("vendor: %x product: %x\n", vendor, product); 439 printk(KERN_INFO KBUILD_MODNAME ": vendor: %x product: %x\n",
440 vendor, product);
439 441
440 for (i = 0; i < ARRAY_SIZE(id_table); i++) { 442 for (i = 0; i < ARRAY_SIZE(id_table); i++) {
441 if (!id_table[i].idVendor && !id_table[i].idProduct) { 443 if (!id_table[i].idVendor && !id_table[i].idProduct) {