aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2007-10-26 09:53:21 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:00:56 -0500
commit302f61ad5db0e6a4c265e1f6454c102e2283a926 (patch)
treeb5233e9ba26a0c74e4d5fb82fdcf31b1618541ba /drivers/media/video
parent012cf21975e8ccc2d57859413b336087f7f98763 (diff)
V4L/DVB (6409): Cleanup: removed i2c_vidiocschan
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>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 581a3c955739..3e5c50ac9139 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1255,16 +1255,6 @@ audio_input(struct bttv *btv, int input)
1255} 1255}
1256 1256
1257static void 1257static void
1258i2c_vidiocschan(struct bttv *btv)
1259{
1260 v4l2_std_id std = bttv_tvnorms[btv->tvnorm].v4l2_id;
1261
1262 bttv_call_i2c_clients(btv, VIDIOC_S_STD, &std);
1263 if (btv->c.type == BTTV_BOARD_VOODOOTV_FM || btv->c.type == BTTV_BOARD_VOODOOTV_200)
1264 bttv_tda9880_setnorm(btv,btv->tvnorm);
1265}
1266
1267static void
1268bttv_crop_calc_limits(struct bttv_crop *c) 1258bttv_crop_calc_limits(struct bttv_crop *c)
1269{ 1259{
1270 /* Scale factor min. 1:1, max. 16:1. Min. image size 1260 /* Scale factor min. 1:1, max. 16:1. Min. image size
@@ -1298,6 +1288,7 @@ static int
1298set_tvnorm(struct bttv *btv, unsigned int norm) 1288set_tvnorm(struct bttv *btv, unsigned int norm)
1299{ 1289{
1300 const struct bttv_tvnorm *tvnorm; 1290 const struct bttv_tvnorm *tvnorm;
1291 v4l2_std_id id;
1301 1292
1302 if (norm < 0 || norm >= BTTV_TVNORMS) 1293 if (norm < 0 || norm >= BTTV_TVNORMS)
1303 return -EINVAL; 1294 return -EINVAL;
@@ -1334,6 +1325,9 @@ set_tvnorm(struct bttv *btv, unsigned int norm)
1334 bttv_tda9880_setnorm(btv,norm); 1325 bttv_tda9880_setnorm(btv,norm);
1335 break; 1326 break;
1336 } 1327 }
1328 id = tvnorm->v4l2_id;
1329 bttv_call_i2c_clients(btv, VIDIOC_S_STD, &id);
1330
1337 return 0; 1331 return 0;
1338} 1332}
1339 1333
@@ -1359,7 +1353,6 @@ set_input(struct bttv *btv, unsigned int input, unsigned int norm)
1359 audio_input(btv,(input == bttv_tvcards[btv->c.type].tuner ? 1353 audio_input(btv,(input == bttv_tvcards[btv->c.type].tuner ?
1360 TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN)); 1354 TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN));
1361 set_tvnorm(btv, norm); 1355 set_tvnorm(btv, norm);
1362 i2c_vidiocschan(btv);
1363} 1356}
1364 1357
1365static void init_irqreg(struct bttv *btv) 1358static void init_irqreg(struct bttv *btv)
@@ -2095,7 +2088,6 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
2095 2088
2096 mutex_lock(&btv->lock); 2089 mutex_lock(&btv->lock);
2097 set_tvnorm(btv,i); 2090 set_tvnorm(btv,i);
2098 i2c_vidiocschan(btv);
2099 mutex_unlock(&btv->lock); 2091 mutex_unlock(&btv->lock);
2100 return 0; 2092 return 0;
2101 } 2093 }
@@ -3777,7 +3769,7 @@ static int bttv_open(struct inode *inode, struct file *file)
3777 V4L2_FIELD_SEQ_TB, 3769 V4L2_FIELD_SEQ_TB,
3778 sizeof(struct bttv_buffer), 3770 sizeof(struct bttv_buffer),
3779 fh); 3771 fh);
3780 i2c_vidiocschan(btv); 3772 set_tvnorm(btv,btv->tvnorm);
3781 3773
3782 btv->users++; 3774 btv->users++;
3783 3775