]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/media/usb/cx231xx/cx231xx-vbi.c
[media] cx231xx: Cleanup printk at the driver
[mirror_ubuntu-artful-kernel.git] / drivers / media / usb / cx231xx / cx231xx-vbi.c
index c02794274f516812e47f292f6fce60522a8fde0e..14e1eb7f21287bb42164673d9cbdb90cb4b4ac3b 100644 (file)
@@ -19,6 +19,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include "cx231xx.h"
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/module.h>
@@ -35,7 +36,6 @@
 #include <media/msp3400.h>
 #include <media/tuner.h>
 
-#include "cx231xx.h"
 #include "cx231xx-vbi.h"
 
 static inline void print_err_status(struct cx231xx *dev, int packet, int status)
@@ -69,11 +69,10 @@ static inline void print_err_status(struct cx231xx *dev, int packet, int status)
                break;
        }
        if (packet < 0) {
-               cx231xx_err("URB status %d [%s].\n", status,
-                           errmsg);
+               pr_err("URB status %d [%s].\n", status, errmsg);
        } else {
-               cx231xx_err("URB packet %d, status %d [%s].\n",
-                           packet, status, errmsg);
+               pr_err("URB packet %d, status %d [%s].\n",
+                       packet, status, errmsg);
        }
 }
 
@@ -316,8 +315,8 @@ static void cx231xx_irq_vbi_callback(struct urb *urb)
        case -ESHUTDOWN:
                return;
        default:                /* error */
-               cx231xx_err("urb completition error %d.\n",
-                           urb->status);
+               pr_err("urb completition error %d.\n",
+                       urb->status);
                break;
        }
 
@@ -331,8 +330,8 @@ static void cx231xx_irq_vbi_callback(struct urb *urb)
 
        urb->status = usb_submit_urb(urb, GFP_ATOMIC);
        if (urb->status) {
-               cx231xx_err("urb resubmit failed (error=%i)\n",
-                           urb->status);
+               pr_err("urb resubmit failed (error=%i)\n",
+                       urb->status);
        }
 }
 
@@ -344,7 +343,7 @@ void cx231xx_uninit_vbi_isoc(struct cx231xx *dev)
        struct urb *urb;
        int i;
 
-       cx231xx_info("called cx231xx_uninit_vbi_isoc\n");
+       pr_debug("called cx231xx_uninit_vbi_isoc\n");
 
        dev->vbi_mode.bulk_ctl.nfields = -1;
        for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) {
@@ -393,7 +392,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
        struct urb *urb;
        int rc;
 
-       cx231xx_info("called cx231xx_vbi_isoc\n");
+       pr_debug("called cx231xx_vbi_isoc\n");
 
        /* De-allocates all pending stuff */
        cx231xx_uninit_vbi_isoc(dev);
@@ -419,14 +418,14 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
        dev->vbi_mode.bulk_ctl.urb = kzalloc(sizeof(void *) * num_bufs,
                                             GFP_KERNEL);
        if (!dev->vbi_mode.bulk_ctl.urb) {
-               cx231xx_errdev("cannot alloc memory for usb buffers\n");
+               pr_err("cannot alloc memory for usb buffers\n");
                return -ENOMEM;
        }
 
        dev->vbi_mode.bulk_ctl.transfer_buffer =
            kzalloc(sizeof(void *) * num_bufs, GFP_KERNEL);
        if (!dev->vbi_mode.bulk_ctl.transfer_buffer) {
-               cx231xx_errdev("cannot allocate memory for usbtransfer\n");
+               pr_err("cannot allocate memory for usbtransfer\n");
                kfree(dev->vbi_mode.bulk_ctl.urb);
                return -ENOMEM;
        }
@@ -441,7 +440,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
 
                urb = usb_alloc_urb(0, GFP_KERNEL);
                if (!urb) {
-                       cx231xx_err("cannot alloc bulk_ctl.urb %i\n", i);
+                       pr_err("cannot alloc bulk_ctl.urb %i\n", i);
                        cx231xx_uninit_vbi_isoc(dev);
                        return -ENOMEM;
                }
@@ -451,9 +450,9 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
                dev->vbi_mode.bulk_ctl.transfer_buffer[i] =
                    kzalloc(sb_size, GFP_KERNEL);
                if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) {
-                       cx231xx_err("unable to allocate %i bytes for transfer"
-                                   " buffer %i%s\n", sb_size, i,
-                                   in_interrupt() ? " while in int" : "");
+                       pr_err("unable to allocate %i bytes for transfer buffer %i%s\n",
+                               sb_size, i,
+                               in_interrupt() ? " while in int" : "");
                        cx231xx_uninit_vbi_isoc(dev);
                        return -ENOMEM;
                }
@@ -470,8 +469,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
        for (i = 0; i < dev->vbi_mode.bulk_ctl.num_bufs; i++) {
                rc = usb_submit_urb(dev->vbi_mode.bulk_ctl.urb[i], GFP_ATOMIC);
                if (rc) {
-                       cx231xx_err("submit of urb %i failed (error=%i)\n", i,
-                                   rc);
+                       pr_err("submit of urb %i failed (error=%i)\n", i, rc);
                        cx231xx_uninit_vbi_isoc(dev);
                        return rc;
                }
@@ -522,7 +520,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev,
                                     struct cx231xx_buffer *buf)
 {
        /* Advice that buffer was filled */
-       /* cx231xx_info("[%p/%d] wakeup\n", buf, buf->vb.i); */
+       /* pr_debug("[%p/%d] wakeup\n", buf, buf->vb.i); */
 
        buf->vb.state = VIDEOBUF_DONE;
        buf->vb.field_count++;
@@ -614,7 +612,7 @@ static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
        char *outp;
 
        if (list_empty(&dma_q->active)) {
-               cx231xx_err("No active queue to serve\n");
+               pr_err("No active queue to serve\n");
                dev->vbi_mode.bulk_ctl.buf = NULL;
                *buf = NULL;
                return;