diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-15 19:27:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-15 19:27:18 -0400 |
commit | 689c2781ee9d16069a436964f014ffc260af99e5 (patch) | |
tree | 64908cb71af98371d3d6ff9108fef53037e28a8e /drivers/usb/serial | |
parent | a94e9b94cc9b6d193bc69e6c9a3044aed4b7a5d9 (diff) |
USB: generic.c: remove dbg() usage
dbg() is a usb-serial specific macro. This patch converts
the generic.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/generic.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 3644f513a4e0..105a6d898ca4 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -252,7 +252,7 @@ int usb_serial_generic_write_room(struct tty_struct *tty) | |||
252 | room = kfifo_avail(&port->write_fifo); | 252 | room = kfifo_avail(&port->write_fifo); |
253 | spin_unlock_irqrestore(&port->lock, flags); | 253 | spin_unlock_irqrestore(&port->lock, flags); |
254 | 254 | ||
255 | dbg("%s - returns %d", __func__, room); | 255 | dev_dbg(&port->dev, "%s - returns %d\n", __func__, room); |
256 | return room; | 256 | return room; |
257 | } | 257 | } |
258 | 258 | ||
@@ -269,7 +269,7 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty) | |||
269 | chars = kfifo_len(&port->write_fifo) + port->tx_bytes; | 269 | chars = kfifo_len(&port->write_fifo) + port->tx_bytes; |
270 | spin_unlock_irqrestore(&port->lock, flags); | 270 | spin_unlock_irqrestore(&port->lock, flags); |
271 | 271 | ||
272 | dbg("%s - returns %d", __func__, chars); | 272 | dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars); |
273 | return chars; | 273 | return chars; |
274 | } | 274 | } |
275 | 275 | ||
@@ -281,7 +281,8 @@ static int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, | |||
281 | if (!test_and_clear_bit(index, &port->read_urbs_free)) | 281 | if (!test_and_clear_bit(index, &port->read_urbs_free)) |
282 | return 0; | 282 | return 0; |
283 | 283 | ||
284 | dbg("%s - port %d, urb %d", __func__, port->number, index); | 284 | dev_dbg(&port->dev, "%s - port %d, urb %d\n", __func__, |
285 | port->number, index); | ||
285 | 286 | ||
286 | res = usb_submit_urb(port->read_urbs[index], mem_flags); | 287 | res = usb_submit_urb(port->read_urbs[index], mem_flags); |
287 | if (res) { | 288 | if (res) { |
@@ -361,10 +362,12 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb) | |||
361 | } | 362 | } |
362 | set_bit(i, &port->read_urbs_free); | 363 | set_bit(i, &port->read_urbs_free); |
363 | 364 | ||
364 | dbg("%s - port %d, urb %d, len %d", __func__, port->number, i, | 365 | dev_dbg(&port->dev, "%s - port %d, urb %d, len %d\n", |
365 | urb->actual_length); | 366 | __func__, port->number, i, urb->actual_length); |
367 | |||
366 | if (urb->status) { | 368 | if (urb->status) { |
367 | dbg("%s - non-zero urb status: %d", __func__, urb->status); | 369 | dev_dbg(&port->dev, "%s - non-zero urb status: %d\n", |
370 | __func__, urb->status); | ||
368 | return; | 371 | return; |
369 | } | 372 | } |
370 | 373 | ||
@@ -400,7 +403,8 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb) | |||
400 | spin_unlock_irqrestore(&port->lock, flags); | 403 | spin_unlock_irqrestore(&port->lock, flags); |
401 | 404 | ||
402 | if (status) { | 405 | if (status) { |
403 | dbg("%s - non-zero urb status: %d", __func__, status); | 406 | dev_dbg(&port->dev, "%s - non-zero urb status: %d\n", |
407 | __func__, status); | ||
404 | 408 | ||
405 | spin_lock_irqsave(&port->lock, flags); | 409 | spin_lock_irqsave(&port->lock, flags); |
406 | kfifo_reset_out(&port->write_fifo); | 410 | kfifo_reset_out(&port->write_fifo); |
@@ -485,7 +489,8 @@ void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | |||
485 | { | 489 | { |
486 | struct tty_port *port = &usb_port->port; | 490 | struct tty_port *port = &usb_port->port; |
487 | 491 | ||
488 | dbg("%s - port %d, status %d", __func__, usb_port->number, status); | 492 | dev_dbg(&usb_port->dev, "%s - port %d, status %d\n", __func__, |
493 | usb_port->number, status); | ||
489 | 494 | ||
490 | if (status) | 495 | if (status) |
491 | wake_up_interruptible(&port->open_wait); | 496 | wake_up_interruptible(&port->open_wait); |