aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-11 09:57:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-06 17:11:51 -0400
commit88bb42fb5a556ffc918279cad3f86d83c353f055 (patch)
tree4c42070ae8c6a9a88edb2d01fe261ae7e4110b0e /drivers/media/video/cx88
parentc5a861449fcd4f50d30376986ebdb0692f0bf1f1 (diff)
[media] cx88: add priority support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c4
-rw-r--r--drivers/media/video/cx88/cx88-core.c1
-rw-r--r--drivers/media/video/cx88/cx88-video.c4
-rw-r--r--drivers/media/video/cx88/cx88.h3
4 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index d8c25c5bb323..95cdfed80f4e 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -974,6 +974,7 @@ static int mpeg_open(struct file *file)
974 mutex_unlock(&dev->core->lock); 974 mutex_unlock(&dev->core->lock);
975 return -ENOMEM; 975 return -ENOMEM;
976 } 976 }
977 v4l2_fh_init(&fh->fh, vdev);
977 file->private_data = fh; 978 file->private_data = fh;
978 fh->dev = dev; 979 fh->dev = dev;
979 980
@@ -990,6 +991,7 @@ static int mpeg_open(struct file *file)
990 991
991 dev->core->mpeg_users++; 992 dev->core->mpeg_users++;
992 mutex_unlock(&dev->core->lock); 993 mutex_unlock(&dev->core->lock);
994 v4l2_fh_add(&fh->fh);
993 return 0; 995 return 0;
994} 996}
995 997
@@ -1010,6 +1012,8 @@ static int mpeg_release(struct file *file)
1010 1012
1011 videobuf_mmap_free(&fh->mpegq); 1013 videobuf_mmap_free(&fh->mpegq);
1012 1014
1015 v4l2_fh_del(&fh->fh);
1016 v4l2_fh_exit(&fh->fh);
1013 file->private_data = NULL; 1017 file->private_data = NULL;
1014 kfree(fh); 1018 kfree(fh);
1015 1019
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index 8bd925db412b..e81c735f012a 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -1036,6 +1036,7 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
1036 vfd->release = video_device_release; 1036 vfd->release = video_device_release;
1037 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", 1037 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
1038 core->name, type, core->board.name); 1038 core->name, type, core->board.name);
1039 set_bit(V4L2_FL_USE_FH_PRIO, &vfd->flags);
1039 return vfd; 1040 return vfd;
1040} 1041}
1041 1042
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
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 94af48e91b52..0cae0fd9e164 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -26,6 +26,7 @@
26#include <linux/kdev_t.h> 26#include <linux/kdev_t.h>
27 27
28#include <media/v4l2-device.h> 28#include <media/v4l2-device.h>
29#include <media/v4l2-fh.h>
29#include <media/tuner.h> 30#include <media/tuner.h>
30#include <media/tveeprom.h> 31#include <media/tveeprom.h>
31#include <media/videobuf-dma-sg.h> 32#include <media/videobuf-dma-sg.h>
@@ -454,6 +455,7 @@ struct cx8802_dev;
454/* function 0: video stuff */ 455/* function 0: video stuff */
455 456
456struct cx8800_fh { 457struct cx8800_fh {
458 struct v4l2_fh fh;
457 struct cx8800_dev *dev; 459 struct cx8800_dev *dev;
458 unsigned int resources; 460 unsigned int resources;
459 461
@@ -504,6 +506,7 @@ struct cx8800_dev {
504/* function 2: mpeg stuff */ 506/* function 2: mpeg stuff */
505 507
506struct cx8802_fh { 508struct cx8802_fh {
509 struct v4l2_fh fh;
507 struct cx8802_dev *dev; 510 struct cx8802_dev *dev;
508 struct videobuf_queue mpegq; 511 struct videobuf_queue mpegq;
509}; 512};