summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-26 11:53:21 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-26 11:53:21 -0200
commitf91895a0ab0593480380667891cf0be615c1cc85 (patch)
tree17ae945e91de044eb0abc1b5b2df46a68634d7b6 /linux/drivers/media/video/bt8xx/bttv-driver.c
parenta85302f51c025ddce51d02af80e11649d0830a0a (diff)
downloadmediapointer-dvb-s2-f91895a0ab0593480380667891cf0be615c1cc85.tar.gz
mediapointer-dvb-s2-f91895a0ab0593480380667891cf0be615c1cc85.tar.bz2
Cleanup: removed i2c_vidiocschan
From: Nickolay V. Shmyrev <nshmyrev@yandex.ru> This is part of the old V4L1->V4L2 bttv patch, ported to current tree by Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/bt8xx/bttv-driver.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index 37db47ecc..bddba58b2 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -1291,16 +1291,6 @@ audio_input(struct bttv *btv, int input)
}
static void
-i2c_vidiocschan(struct bttv *btv)
-{
- v4l2_std_id std = bttv_tvnorms[btv->tvnorm].v4l2_id;
-
- bttv_call_i2c_clients(btv, VIDIOC_S_STD, &std);
- if (btv->c.type == BTTV_BOARD_VOODOOTV_FM || btv->c.type == BTTV_BOARD_VOODOOTV_200)
- bttv_tda9880_setnorm(btv,btv->tvnorm);
-}
-
-static void
bttv_crop_calc_limits(struct bttv_crop *c)
{
/* Scale factor min. 1:1, max. 16:1. Min. image size
@@ -1334,6 +1324,7 @@ static int
set_tvnorm(struct bttv *btv, unsigned int norm)
{
const struct bttv_tvnorm *tvnorm;
+ v4l2_std_id id;
if (norm < 0 || norm >= BTTV_TVNORMS)
return -EINVAL;
@@ -1375,6 +1366,9 @@ set_tvnorm(struct bttv *btv, unsigned int norm)
break;
#endif
}
+ id = tvnorm->v4l2_id;
+ bttv_call_i2c_clients(btv, VIDIOC_S_STD, &id);
+
return 0;
}
@@ -1400,7 +1394,6 @@ set_input(struct bttv *btv, unsigned int input, unsigned int norm)
audio_input(btv,(input == bttv_tvcards[btv->c.type].tuner ?
TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN));
set_tvnorm(btv, norm);
- i2c_vidiocschan(btv);
}
static void init_irqreg(struct bttv *btv)
@@ -2136,7 +2129,6 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
mutex_lock(&btv->lock);
set_tvnorm(btv,i);
- i2c_vidiocschan(btv);
mutex_unlock(&btv->lock);
return 0;
}
@@ -3820,7 +3812,7 @@ static int bttv_open(struct inode *inode, struct file *file)
V4L2_FIELD_SEQ_TB,
sizeof(struct bttv_buffer),
fh);
- i2c_vidiocschan(btv);
+ set_tvnorm(btv,btv->tvnorm);
btv->users++;