aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index bd1f52f6e264..673f88be325f 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -744,6 +744,7 @@ static int video_open(struct file *file)
744 if (unlikely(!fh)) 744 if (unlikely(!fh))
745 return -ENOMEM; 745 return -ENOMEM;
746 746
747 v4l2_fh_init(&fh->fh, vdev);
747 file->private_data = fh; 748 file->private_data = fh;
748 fh->dev = dev; 749 fh->dev = dev;
749 750
@@ -788,6 +789,7 @@ static int video_open(struct file *file)
788 789
789 core->users++; 790 core->users++;
790 mutex_unlock(&core->lock); 791 mutex_unlock(&core->lock);
792 v4l2_fh_add(&fh->fh);
791 793
792 return 0; 794 return 0;
793} 795}
@@ -883,6 +885,8 @@ static int video_release(struct file *file)
883 videobuf_mmap_free(&fh->vbiq); 885 videobuf_mmap_free(&fh->vbiq);
884 886
885 mutex_lock(&dev->core->lock); 887 mutex_lock(&dev->core->lock);
888 v4l2_fh_del(&fh->fh);
889 v4l2_fh_exit(&fh->fh);
886 file->private_data = NULL; 890 file->private_data = NULL;
887 kfree(fh); 891 kfree(fh);
888 892