Storage class should be before const qualifier
[deliverable/linux.git] / drivers / media / video / pvrusb2 / pvrusb2-cx2584x-v4l.c
index 27eadaff75a0eeb052769db0ef55abf940b084a0..8df969c4874c7a7dcddd8b5232ccf87f0a84115e 100644 (file)
@@ -139,8 +139,8 @@ static const struct pvr2_v4l_cx2584x_ops decoder_ops[] = {
 
 static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt)
 {
-       ctxt->client->handler = 0;
-       ctxt->hdw->decoder_ctrl = 0;
+       ctxt->client->handler = NULL;
+       ctxt->hdw->decoder_ctrl = NULL;
        kfree(ctxt);
 }
 
@@ -221,12 +221,12 @@ static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt,
 static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt)
 {
        int ret;
-       ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0);
+       ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL);
        pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret);
 }
 
 
-const static struct pvr2_i2c_handler_functions hfuncs = {
+static const struct pvr2_i2c_handler_functions hfuncs = {
        .detach = (void (*)(void *))decoder_detach,
        .check = (int (*)(void *))decoder_check,
        .update = (void (*)(void *))decoder_update,
@@ -260,6 +260,22 @@ int pvr2_i2c_cx2584x_v4l_setup(struct pvr2_hdw *hdw,
                                  sizeof(decoder_ops[0]))) - 1;
        hdw->decoder_ctrl = &ctxt->ctrl;
        cp->handler = &ctxt->handler;
+       {
+               /*
+                 Mike Isely <isely@pobox.com> 19-Nov-2006 - This bit
+                 of nuttiness for cx25840 causes that module to
+                 correctly set up its video scaling.  This is really
+                 a problem in the cx25840 module itself, but we work
+                 around it here.  The problem has not been seen in
+                 ivtv because there VBI is supported and set up.  We
+                 don't do VBI here (at least not yet) and thus we
+                 never attempted to even set it up.
+                */
+               struct v4l2_format fmt;
+               memset(&fmt,0,sizeof(fmt));
+               fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
+               pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_FMT,&fmt);
+       }
        pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x cx2584x V4L2 handler set up",
                   cp->client->addr);
        return !0;
This page took 0.027177 seconds and 5 git commands to generate.