]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6409): Cleanup: removed i2c_vidiocschan
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Fri, 26 Oct 2007 13:53:21 +0000 (10:53 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:00:56 +0000 (19:00 -0200)
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>
drivers/media/video/bt8xx/bttv-driver.c

index 581a3c955739def38f8bac332594f786283cc1cb..3e5c50ac9139dfd2ca030b9563d9ed30335beb62 100644 (file)
@@ -1254,16 +1254,6 @@ audio_input(struct bttv *btv, int input)
        return audio_mux(btv, input, btv->mute);
 }
 
-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)
 {
@@ -1298,6 +1288,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;
@@ -1334,6 +1325,9 @@ set_tvnorm(struct bttv *btv, unsigned int norm)
                bttv_tda9880_setnorm(btv,norm);
                break;
        }
+       id = tvnorm->v4l2_id;
+       bttv_call_i2c_clients(btv, VIDIOC_S_STD, &id);
+
        return 0;
 }
 
@@ -1359,7 +1353,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)
@@ -2095,7 +2088,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;
        }
@@ -3777,7 +3769,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++;