[media] staging: media: davinci: vpfe: use v4l2_fh for priority handling
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Sun, 23 Mar 2014 06:37:24 +0000 (03:37 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 16 Apr 2014 21:26:03 +0000 (18:26 -0300)
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h
drivers/staging/media/davinci_vpfe/vpfe_video.c
drivers/staging/media/davinci_vpfe/vpfe_video.h

index 68f6fe43a5b54c3d29f82fdae7b6c17fc8b33c08..2632a806c4a8c39554addb426c368133b3a52eff 100644 (file)
@@ -87,8 +87,6 @@ struct vpfe_fh {
        struct vpfe_video_device *video;
        /* Indicates whether this file handle is doing IO */
        u8 io_allowed;
-       /* Used to keep track priority of this instance */
-       enum v4l2_priority prio;
 };
 
 void mbus_to_pix(const struct v4l2_mbus_framefmt *mbus,
index acc8184c46cde0d85ebeccd41c000b67ae9da429..c86ab8436c99eb442f992f191c5331a67b15b6b4 100644 (file)
@@ -415,7 +415,6 @@ static int vpfe_open(struct file *file)
        video->usrs++;
        /* Set io_allowed member to false */
        handle->io_allowed = 0;
-       v4l2_prio_open(&video->prio, &handle->prio);
        handle->video = video;
        file->private_data = &handle->vfh;
        mutex_unlock(&video->lock);
@@ -532,8 +531,8 @@ static int vpfe_release(struct file *file)
        }
        /* Decrement device users counter */
        video->usrs--;
-       /* Close the priority */
-       v4l2_prio_close(&video->prio, fh->prio);
+       v4l2_fh_del(&fh->vfh);
+       v4l2_fh_exit(&fh->vfh);
        /* If this is the last file handle */
        if (!video->usrs)
                video->initialized = 0;
@@ -1590,8 +1589,6 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name)
        snprintf(video->video_dev.name, sizeof(video->video_dev.name),
                 "DAVINCI VIDEO %s %s", name, direction);
 
-       /* Initialize prio member of device object */
-       v4l2_prio_init(&video->prio);
        spin_lock_init(&video->irqlock);
        spin_lock_init(&video->dma_queue_lock);
        mutex_init(&video->lock);
@@ -1600,6 +1597,7 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name)
        if (ret < 0)
                return ret;
 
+       set_bit(V4L2_FL_USE_FH_PRIO, &video->video_dev.flags);
        video_set_drvdata(&video->video_dev, video);
 
        return 0;
index ca9a70245233b898a09fbad0ace260868f3a673c..1b1b6c4a56b75d77ca605be558b187e2c712e7b6 100644 (file)
@@ -102,8 +102,6 @@ struct vpfe_video_device {
         * user has selected
         */
        enum v4l2_memory                        memory;
-       /* Used to keep track of state of the priority */
-       struct v4l2_prio_state                  prio;
        /* number of open instances of the channel */
        u32                                     usrs;
        /* flag to indicate whether decoder is initialized */
This page took 0.029033 seconds and 5 git commands to generate.