diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-01 07:09:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 12:55:23 -0500 |
commit | 589dadf299bc8dab27589ecd62024c96a3812505 (patch) | |
tree | ca4b1213906a970a6579a386716878a01f216d84 /drivers/media/usb/cx231xx/cx231xx-vbi.c | |
parent | f2dd851ff19412bdc80471048283edbb465f812e (diff) |
[media] cx231xx: get rid of driver-defined printk macros
It currently does just like what pr_foo() macros do. So,
replace them.
A deeper cleanup is needed, as there are lots of debug macros
printed with pr_info.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-vbi.c')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-vbi.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c index c02794274f51..f80126d3525a 100644 --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "cx231xx.h" | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -35,7 +36,6 @@ | |||
35 | #include <media/msp3400.h> | 36 | #include <media/msp3400.h> |
36 | #include <media/tuner.h> | 37 | #include <media/tuner.h> |
37 | 38 | ||
38 | #include "cx231xx.h" | ||
39 | #include "cx231xx-vbi.h" | 39 | #include "cx231xx-vbi.h" |
40 | 40 | ||
41 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) | 41 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) |
@@ -69,10 +69,10 @@ static inline void print_err_status(struct cx231xx *dev, int packet, int status) | |||
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | if (packet < 0) { | 71 | if (packet < 0) { |
72 | cx231xx_err("URB status %d [%s].\n", status, | 72 | pr_err("URB status %d [%s].\n", status, |
73 | errmsg); | 73 | errmsg); |
74 | } else { | 74 | } else { |
75 | cx231xx_err("URB packet %d, status %d [%s].\n", | 75 | pr_err("URB packet %d, status %d [%s].\n", |
76 | packet, status, errmsg); | 76 | packet, status, errmsg); |
77 | } | 77 | } |
78 | } | 78 | } |
@@ -316,7 +316,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
316 | case -ESHUTDOWN: | 316 | case -ESHUTDOWN: |
317 | return; | 317 | return; |
318 | default: /* error */ | 318 | default: /* error */ |
319 | cx231xx_err("urb completition error %d.\n", | 319 | pr_err("urb completition error %d.\n", |
320 | urb->status); | 320 | urb->status); |
321 | break; | 321 | break; |
322 | } | 322 | } |
@@ -331,7 +331,7 @@ static void cx231xx_irq_vbi_callback(struct urb *urb) | |||
331 | 331 | ||
332 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); | 332 | urb->status = usb_submit_urb(urb, GFP_ATOMIC); |
333 | if (urb->status) { | 333 | if (urb->status) { |
334 | cx231xx_err("urb resubmit failed (error=%i)\n", | 334 | pr_err("urb resubmit failed (error=%i)\n", |
335 | urb->status); | 335 | urb->status); |
336 | } | 336 | } |
337 | } | 337 | } |
@@ -344,7 +344,7 @@ void cx231xx_uninit_vbi_isoc(struct cx231xx *dev) | |||
344 | struct urb *urb; | 344 | struct urb *urb; |
345 | int i; | 345 | int i; |
346 | 346 | ||
347 | cx231xx_info("called cx231xx_uninit_vbi_isoc\n"); | 347 | pr_info("called cx231xx_uninit_vbi_isoc\n"); |
348 | 348 | ||
349 | dev->vbi_mode.bulk_ctl.nfields = -1; | 349 | dev->vbi_mode.bulk_ctl.nfields = -1; |
350 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 350 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
@@ -393,7 +393,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
393 | struct urb *urb; | 393 | struct urb *urb; |
394 | int rc; | 394 | int rc; |
395 | 395 | ||
396 | cx231xx_info("called cx231xx_vbi_isoc\n"); | 396 | pr_info("called cx231xx_vbi_isoc\n"); |
397 | 397 | ||
398 | /* De-allocates all pending stuff */ | 398 | /* De-allocates all pending stuff */ |
399 | cx231xx_uninit_vbi_isoc(dev); | 399 | cx231xx_uninit_vbi_isoc(dev); |
@@ -419,14 +419,14 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
419 | dev->vbi_mode.bulk_ctl.urb = kzalloc(sizeof(void *) * num_bufs, | 419 | dev->vbi_mode.bulk_ctl.urb = kzalloc(sizeof(void *) * num_bufs, |
420 | GFP_KERNEL); | 420 | GFP_KERNEL); |
421 | if (!dev->vbi_mode.bulk_ctl.urb) { | 421 | if (!dev->vbi_mode.bulk_ctl.urb) { |
422 | cx231xx_errdev("cannot alloc memory for usb buffers\n"); | 422 | pr_err("cannot alloc memory for usb buffers\n"); |
423 | return -ENOMEM; | 423 | return -ENOMEM; |
424 | } | 424 | } |
425 | 425 | ||
426 | dev->vbi_mode.bulk_ctl.transfer_buffer = | 426 | dev->vbi_mode.bulk_ctl.transfer_buffer = |
427 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); | 427 | kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL); |
428 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer) { | 428 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer) { |
429 | cx231xx_errdev("cannot allocate memory for usbtransfer\n"); | 429 | pr_err("cannot allocate memory for usbtransfer\n"); |
430 | kfree(dev->vbi_mode.bulk_ctl.urb); | 430 | kfree(dev->vbi_mode.bulk_ctl.urb); |
431 | return -ENOMEM; | 431 | return -ENOMEM; |
432 | } | 432 | } |
@@ -441,7 +441,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
441 | 441 | ||
442 | urb = usb_alloc_urb(0, GFP_KERNEL); | 442 | urb = usb_alloc_urb(0, GFP_KERNEL); |
443 | if (!urb) { | 443 | if (!urb) { |
444 | cx231xx_err("cannot alloc bulk_ctl.urb %i\n", i); | 444 | pr_err("cannot alloc bulk_ctl.urb %i\n", i); |
445 | cx231xx_uninit_vbi_isoc(dev); | 445 | cx231xx_uninit_vbi_isoc(dev); |
446 | return -ENOMEM; | 446 | return -ENOMEM; |
447 | } | 447 | } |
@@ -451,7 +451,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
451 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = | 451 | dev->vbi_mode.bulk_ctl.transfer_buffer[i] = |
452 | kzalloc(sb_size, GFP_KERNEL); | 452 | kzalloc(sb_size, GFP_KERNEL); |
453 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { | 453 | if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { |
454 | cx231xx_err("unable to allocate %i bytes for transfer" | 454 | pr_err("unable to allocate %i bytes for transfer" |
455 | " buffer %i%s\n", sb_size, i, | 455 | " buffer %i%s\n", sb_size, i, |
456 | in_interrupt() ? " while in int" : ""); | 456 | in_interrupt() ? " while in int" : ""); |
457 | cx231xx_uninit_vbi_isoc(dev); | 457 | cx231xx_uninit_vbi_isoc(dev); |
@@ -470,7 +470,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, | |||
470 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { | 470 | for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) { |
471 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); | 471 | rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC); |
472 | if (rc) { | 472 | if (rc) { |
473 | cx231xx_err("submit of urb %i failed (error=%i)\n", i, | 473 | pr_err("submit of urb %i failed (error=%i)\n", i, |
474 | rc); | 474 | rc); |
475 | cx231xx_uninit_vbi_isoc(dev); | 475 | cx231xx_uninit_vbi_isoc(dev); |
476 | return rc; | 476 | return rc; |
@@ -522,7 +522,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev, | |||
522 | struct cx231xx_buffer *buf) | 522 | struct cx231xx_buffer *buf) |
523 | { | 523 | { |
524 | /* Advice that buffer was filled */ | 524 | /* Advice that buffer was filled */ |
525 | /* cx231xx_info("[%p/%d] wakeup\n", buf, buf->vb.i); */ | 525 | /* pr_info("[%p/%d] wakeup\n", buf, buf->vb.i); */ |
526 | 526 | ||
527 | buf->vb.state = VIDEOBUF_DONE; | 527 | buf->vb.state = VIDEOBUF_DONE; |
528 | buf->vb.field_count++; | 528 | buf->vb.field_count++; |
@@ -614,7 +614,7 @@ static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q, | |||
614 | char *outp; | 614 | char *outp; |
615 | 615 | ||
616 | if (list_empty(&dma_q->active)) { | 616 | if (list_empty(&dma_q->active)) { |
617 | cx231xx_err("No active queue to serve\n"); | 617 | pr_err("No active queue to serve\n"); |
618 | dev->vbi_mode.bulk_ctl.buf = NULL; | 618 | dev->vbi_mode.bulk_ctl.buf = NULL; |
619 | *buf = NULL; | 619 | *buf = NULL; |
620 | return; | 620 | return; |