Merge branch 'patches_for_v3.6' into v4l_for_linus
[linux-2.6-microblaze.git] / drivers / media / video / cx18 / cx18-streams.c
index 638cca1..9d598ab 100644 (file)
@@ -40,8 +40,7 @@ static struct v4l2_file_operations cx18_v4l2_enc_fops = {
        .owner = THIS_MODULE,
        .read = cx18_v4l2_read,
        .open = cx18_v4l2_open,
-       /* FIXME change to video_ioctl2 if serialization lock can be removed */
-       .unlocked_ioctl = cx18_v4l2_ioctl,
+       .unlocked_ioctl = video_ioctl2,
        .release = cx18_v4l2_close,
        .poll = cx18_v4l2_enc_poll,
        .mmap = cx18_v4l2_mmap,
@@ -376,6 +375,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
        s->video_dev->fops = &cx18_v4l2_enc_fops;
        s->video_dev->release = video_device_release;
        s->video_dev->tvnorms = V4L2_STD_ALL;
+       s->video_dev->lock = &cx->serialize_lock;
        set_bit(V4L2_FL_USE_FH_PRIO, &s->video_dev->flags);
        cx18_set_funcs(s->video_dev);
        return 0;
@@ -980,7 +980,6 @@ void cx18_stop_all_captures(struct cx18 *cx)
 int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
 {
        struct cx18 *cx = s->cx;
-       unsigned long then;
 
        if (!cx18_stream_enabled(s))
                return -EINVAL;
@@ -999,8 +998,6 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
        else
                cx18_vapi(cx, CX18_CPU_CAPTURE_STOP, 1, s->handle);
 
-       then = jiffies;
-
        if (s->type == CX18_ENC_STREAM_TYPE_MPG && gop_end) {
                CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n");
        }