aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-14 15:06:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-14 15:06:52 -0400
commit826575fc958649ebaddfbf89cdca5ed0bd23e6c9 (patch)
treea7fac9f971aac023f33a61eafcf7c18bfc7f6387 /drivers/usb/serial
parent255b703a341d3eaf3ec74f567c00f085225fc3db (diff)
USB: serial: keyspan_pda.c: remove dbg() usage
dbg() was a very old USB-serial-specific macro. This patch removes it from being used in the driver and uses dev_dbg() instead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/keyspan_pda.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 1290b6f0a050..940a0d57bd77 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -137,8 +137,8 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
137 0, 137 0,
138 2000); 138 2000);
139 if (result < 0) 139 if (result < 0)
140 dbg("%s - error %d from usb_control_msg", 140 dev_dbg(&serial->dev->dev, "%s - error %d from usb_control_msg\n",
141 __func__, result); 141 __func__, result);
142} 142}
143 143
144 144
@@ -160,12 +160,10 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
160 case -ENOENT: 160 case -ENOENT:
161 case -ESHUTDOWN: 161 case -ESHUTDOWN:
162 /* this urb is terminated, clean up */ 162 /* this urb is terminated, clean up */
163 dbg("%s - urb shutting down with status: %d", 163 dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n", __func__, status);
164 __func__, status);
165 return; 164 return;
166 default: 165 default:
167 dbg("%s - nonzero urb status received: %d", 166 dev_dbg(&urb->dev->dev, "%s - nonzero urb status received: %d\n", __func__, status);
168 __func__, status);
169 goto exit; 167 goto exit;
170 } 168 }
171 169
@@ -183,7 +181,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
183 break; 181 break;
184 case 1: 182 case 1:
185 /* status interrupt */ 183 /* status interrupt */
186 dbg(" rx int, d1=%d, d2=%d", data[1], data[2]); 184 dev_dbg(&port->dev, "rx int, d1=%d, d2=%d\n", data[1], data[2]);
187 switch (data[1]) { 185 switch (data[1]) {
188 case 1: /* modemline change */ 186 case 1: /* modemline change */
189 break; 187 break;
@@ -229,7 +227,7 @@ static void keyspan_pda_rx_unthrottle(struct tty_struct *tty)
229 /* just restart the receive interrupt URB */ 227 /* just restart the receive interrupt URB */
230 228
231 if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL)) 229 if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
232 dbg(" usb_submit_urb(read urb) failed"); 230 dev_dbg(&port->dev, "usb_submit_urb(read urb) failed\n");
233} 231}
234 232
235 233
@@ -308,8 +306,8 @@ static void keyspan_pda_break_ctl(struct tty_struct *tty, int break_state)
308 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 306 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
309 value, 0, NULL, 0, 2000); 307 value, 0, NULL, 0, 2000);
310 if (result < 0) 308 if (result < 0)
311 dbg("%s - error %d from usb_control_msg", 309 dev_dbg(&port->dev, "%s - error %d from usb_control_msg\n",
312 __func__, result); 310 __func__, result);
313 /* there is something funky about this.. the TCSBRK that 'cu' performs 311 /* there is something funky about this.. the TCSBRK that 'cu' performs
314 ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4 312 ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
315 seconds apart, but it feels like the break sent isn't as long as it 313 seconds apart, but it feels like the break sent isn't as long as it
@@ -347,7 +345,7 @@ static void keyspan_pda_set_termios(struct tty_struct *tty,
347 speed = keyspan_pda_setbaud(serial, speed); 345 speed = keyspan_pda_setbaud(serial, speed);
348 346
349 if (speed == 0) { 347 if (speed == 0) {
350 dbg("can't handle requested baud rate"); 348 dev_dbg(&port->dev, "can't handle requested baud rate\n");
351 /* It hasn't changed so.. */ 349 /* It hasn't changed so.. */
352 speed = tty_termios_baud_rate(old_termios); 350 speed = tty_termios_baud_rate(old_termios);
353 } 351 }
@@ -459,7 +457,7 @@ static int keyspan_pda_write(struct tty_struct *tty,
459 Block if we can't write anything at all, otherwise write as much as 457 Block if we can't write anything at all, otherwise write as much as
460 we can. */ 458 we can. */
461 if (count == 0) { 459 if (count == 0) {
462 dbg(" write request of 0 bytes"); 460 dev_dbg(&port->dev, "write request of 0 bytes\n");
463 return 0; 461 return 0;
464 } 462 }
465 463
@@ -505,16 +503,16 @@ static int keyspan_pda_write(struct tty_struct *tty,
505 1, 503 1,
506 2000); 504 2000);
507 if (rc > 0) { 505 if (rc > 0) {
508 dbg(" roomquery says %d", *room); 506 dev_dbg(&port->dev, "roomquery says %d\n", *room);
509 priv->tx_room = *room; 507 priv->tx_room = *room;
510 } 508 }
511 kfree(room); 509 kfree(room);
512 if (rc < 0) { 510 if (rc < 0) {
513 dbg(" roomquery failed"); 511 dev_dbg(&port->dev, "roomquery failed\n");
514 goto exit; 512 goto exit;
515 } 513 }
516 if (rc == 0) { 514 if (rc == 0) {
517 dbg(" roomquery returned 0 bytes"); 515 dev_dbg(&port->dev, "roomquery returned 0 bytes\n");
518 rc = -EIO; /* device didn't return any data */ 516 rc = -EIO; /* device didn't return any data */
519 goto exit; 517 goto exit;
520 } 518 }
@@ -536,7 +534,7 @@ static int keyspan_pda_write(struct tty_struct *tty,
536 534
537 rc = usb_submit_urb(port->write_urb, GFP_ATOMIC); 535 rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
538 if (rc) { 536 if (rc) {
539 dbg(" usb_submit_urb(write bulk) failed"); 537 dev_dbg(&port->dev, "usb_submit_urb(write bulk) failed\n");
540 goto exit; 538 goto exit;
541 } 539 }
542 } else { 540 } else {
@@ -639,11 +637,11 @@ static int keyspan_pda_open(struct tty_struct *tty,
639 1, 637 1,
640 2000); 638 2000);
641 if (rc < 0) { 639 if (rc < 0) {
642 dbg("%s - roomquery failed", __func__); 640 dev_dbg(&port->dev, "%s - roomquery failed\n", __func__);
643 goto error; 641 goto error;
644 } 642 }
645 if (rc == 0) { 643 if (rc == 0) {
646 dbg("%s - roomquery returned 0 bytes", __func__); 644 dev_dbg(&port->dev, "%s - roomquery returned 0 bytes\n", __func__);
647 rc = -EIO; 645 rc = -EIO;
648 goto error; 646 goto error;
649 } 647 }
@@ -654,7 +652,7 @@ static int keyspan_pda_open(struct tty_struct *tty,
654 /*Start reading from the device*/ 652 /*Start reading from the device*/
655 rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 653 rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
656 if (rc) { 654 if (rc) {
657 dbg("%s - usb_submit_urb(read int) failed", __func__); 655 dev_dbg(&port->dev, "%s - usb_submit_urb(read int) failed\n", __func__);
658 goto error; 656 goto error;
659 } 657 }
660error: 658error: