diff options
author | Johan Hovold <jhovold@gmail.com> | 2011-03-22 06:12:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 19:18:27 -0400 |
commit | 1d9846e505febb71255b098910ace741433312b7 (patch) | |
tree | 64b843da6085051dd0a0451decc51738d97065ed /drivers/usb/class/cdc-acm.c | |
parent | 255ab56c5ae30165d506b837f6576944a02ecdf0 (diff) |
USB: cdc-acm: clean up dev_err and dev_dbg
Clean up some dev_err and dev_dbg messages and make sure that the
appropriate interface device is used for reporting consistently
throughout.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index c9f8a837c5fa..612b9ff0fcf2 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -340,8 +340,8 @@ static void acm_ctrl_irq(struct urb *urb) | |||
340 | exit: | 340 | exit: |
341 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 341 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
342 | if (retval) | 342 | if (retval) |
343 | dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with " | 343 | dev_err(&acm->control->dev, "%s - usb_submit_urb failed: %d\n", |
344 | "result %d\n", __func__, retval); | 344 | __func__, retval); |
345 | } | 345 | } |
346 | 346 | ||
347 | /* data interface returns incoming bytes, or we got unthrottled */ | 347 | /* data interface returns incoming bytes, or we got unthrottled */ |
@@ -355,13 +355,14 @@ static void acm_read_bulk(struct urb *urb) | |||
355 | dbg("Entering acm_read_bulk with status %d", status); | 355 | dbg("Entering acm_read_bulk with status %d", status); |
356 | 356 | ||
357 | if (!ACM_READY(acm)) { | 357 | if (!ACM_READY(acm)) { |
358 | dev_dbg(&acm->data->dev, "Aborting, acm not ready\n"); | 358 | dev_dbg(&acm->data->dev, "%s - acm not ready\n", __func__); |
359 | return; | 359 | return; |
360 | } | 360 | } |
361 | usb_mark_last_busy(acm->dev); | 361 | usb_mark_last_busy(acm->dev); |
362 | 362 | ||
363 | if (status) | 363 | if (status) |
364 | dev_dbg(&acm->data->dev, "bulk rx status %d\n", status); | 364 | dev_dbg(&acm->data->dev, "%s - non-zero urb status: %d\n", |
365 | __func__, status); | ||
365 | 366 | ||
366 | buf = rcv->buffer; | 367 | buf = rcv->buffer; |
367 | buf->size = urb->actual_length; | 368 | buf->size = urb->actual_length; |
@@ -511,7 +512,8 @@ static void acm_write_bulk(struct urb *urb) | |||
511 | 512 | ||
512 | if (verbose || urb->status | 513 | if (verbose || urb->status |
513 | || (urb->actual_length != urb->transfer_buffer_length)) | 514 | || (urb->actual_length != urb->transfer_buffer_length)) |
514 | dev_dbg(&acm->data->dev, "tx %d/%d bytes -- > %d\n", | 515 | dev_dbg(&acm->data->dev, "%s - len %d/%d, status %d\n", |
516 | __func__, | ||
515 | urb->actual_length, | 517 | urb->actual_length, |
516 | urb->transfer_buffer_length, | 518 | urb->transfer_buffer_length, |
517 | urb->status); | 519 | urb->status); |
@@ -530,7 +532,8 @@ static void acm_softint(struct work_struct *work) | |||
530 | struct acm *acm = container_of(work, struct acm, work); | 532 | struct acm *acm = container_of(work, struct acm, work); |
531 | struct tty_struct *tty; | 533 | struct tty_struct *tty; |
532 | 534 | ||
533 | dev_vdbg(&acm->data->dev, "tx work\n"); | 535 | dev_vdbg(&acm->data->dev, "%s\n", __func__); |
536 | |||
534 | if (!ACM_READY(acm)) | 537 | if (!ACM_READY(acm)) |
535 | return; | 538 | return; |
536 | tty = tty_port_tty_get(&acm->port); | 539 | tty = tty_port_tty_get(&acm->port); |