aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-05-01 07:03:24 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:54 -0400
commitffb4877ba013f94322083f77cbb05b35c2a218aa (patch)
tree0d041da73986e1dc7c845ff4418fb20f46bd7506 /drivers/media/video/bt8xx/bttv-driver.c
parent530d2d32068eaf3616e0ce9e58a5fde5701c3380 (diff)
V4L/DVB: v4l2-common: simplify prio utility functions
v4l2_prio_init/open/close returned an int when in fact they would always return 0. Make these void functions. v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a pointer for no good reason. Replace with a normal enum v4l2_priority argument. These changes will simplify the work of moving priority handling into the v4l core. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index fcfc934a3667..38c7f78ad9cf 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1525,7 +1525,7 @@ static int bttv_s_ctrl(struct file *file, void *f,
1525 struct bttv_fh *fh = f; 1525 struct bttv_fh *fh = f;
1526 struct bttv *btv = fh->btv; 1526 struct bttv *btv = fh->btv;
1527 1527
1528 err = v4l2_prio_check(&btv->prio, &fh->prio); 1528 err = v4l2_prio_check(&btv->prio, fh->prio);
1529 if (0 != err) 1529 if (0 != err)
1530 return err; 1530 return err;
1531 1531
@@ -1859,7 +1859,7 @@ static int bttv_s_std(struct file *file, void *priv, v4l2_std_id *id)
1859 unsigned int i; 1859 unsigned int i;
1860 int err; 1860 int err;
1861 1861
1862 err = v4l2_prio_check(&btv->prio, &fh->prio); 1862 err = v4l2_prio_check(&btv->prio, fh->prio);
1863 if (0 != err) 1863 if (0 != err)
1864 return err; 1864 return err;
1865 1865
@@ -1941,7 +1941,7 @@ static int bttv_s_input(struct file *file, void *priv, unsigned int i)
1941 1941
1942 int err; 1942 int err;
1943 1943
1944 err = v4l2_prio_check(&btv->prio, &fh->prio); 1944 err = v4l2_prio_check(&btv->prio, fh->prio);
1945 if (0 != err) 1945 if (0 != err)
1946 return err; 1946 return err;
1947 1947
@@ -1961,7 +1961,7 @@ static int bttv_s_tuner(struct file *file, void *priv,
1961 struct bttv *btv = fh->btv; 1961 struct bttv *btv = fh->btv;
1962 int err; 1962 int err;
1963 1963
1964 err = v4l2_prio_check(&btv->prio, &fh->prio); 1964 err = v4l2_prio_check(&btv->prio, fh->prio);
1965 if (0 != err) 1965 if (0 != err)
1966 return err; 1966 return err;
1967 1967
@@ -2001,7 +2001,7 @@ static int bttv_s_frequency(struct file *file, void *priv,
2001 struct bttv *btv = fh->btv; 2001 struct bttv *btv = fh->btv;
2002 int err; 2002 int err;
2003 2003
2004 err = v4l2_prio_check(&btv->prio, &fh->prio); 2004 err = v4l2_prio_check(&btv->prio, fh->prio);
2005 if (0 != err) 2005 if (0 != err)
2006 return err; 2006 return err;
2007 2007
@@ -3024,7 +3024,7 @@ static int bttv_s_crop(struct file *file, void *f, struct v4l2_crop *crop)
3024 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) 3024 crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY)
3025 return -EINVAL; 3025 return -EINVAL;
3026 3026
3027 retval = v4l2_prio_check(&btv->prio, &fh->prio); 3027 retval = v4l2_prio_check(&btv->prio, fh->prio);
3028 if (0 != retval) 3028 if (0 != retval)
3029 return retval; 3029 return retval;
3030 3030
@@ -3236,7 +3236,7 @@ static int bttv_open(struct file *file)
3236 *fh = btv->init; 3236 *fh = btv->init;
3237 fh->type = type; 3237 fh->type = type;
3238 fh->ov.setup_ok = 0; 3238 fh->ov.setup_ok = 0;
3239 v4l2_prio_open(&btv->prio,&fh->prio); 3239 v4l2_prio_open(&btv->prio, &fh->prio);
3240 3240
3241 videobuf_queue_sg_init(&fh->cap, &bttv_video_qops, 3241 videobuf_queue_sg_init(&fh->cap, &bttv_video_qops,
3242 &btv->c.pci->dev, &btv->s_lock, 3242 &btv->c.pci->dev, &btv->s_lock,
@@ -3307,7 +3307,7 @@ static int bttv_release(struct file *file)
3307 /* free stuff */ 3307 /* free stuff */
3308 videobuf_mmap_free(&fh->cap); 3308 videobuf_mmap_free(&fh->cap);
3309 videobuf_mmap_free(&fh->vbi); 3309 videobuf_mmap_free(&fh->vbi);
3310 v4l2_prio_close(&btv->prio,&fh->prio); 3310 v4l2_prio_close(&btv->prio, fh->prio);
3311 file->private_data = NULL; 3311 file->private_data = NULL;
3312 kfree(fh); 3312 kfree(fh);
3313 3313
@@ -3444,7 +3444,7 @@ static int radio_release(struct file *file)
3444 struct bttv *btv = fh->btv; 3444 struct bttv *btv = fh->btv;
3445 struct rds_command cmd; 3445 struct rds_command cmd;
3446 3446
3447 v4l2_prio_close(&btv->prio,&fh->prio); 3447 v4l2_prio_close(&btv->prio, fh->prio);
3448 file->private_data = NULL; 3448 file->private_data = NULL;
3449 kfree(fh); 3449 kfree(fh);
3450 3450