aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 7913e2ec7a5b..692dc69f691d 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1025,7 +1025,6 @@ i2c_vidiocschan(struct bttv *btv)
1025{ 1025{
1026 v4l2_std_id std = bttv_tvnorms[btv->tvnorm].v4l2_id; 1026 v4l2_std_id std = bttv_tvnorms[btv->tvnorm].v4l2_id;
1027 1027
1028 bttv_call_i2c_clients(btv, VIDIOC_S_INPUT, &btv->input);
1029 bttv_call_i2c_clients(btv, VIDIOC_S_STD, &std); 1028 bttv_call_i2c_clients(btv, VIDIOC_S_STD, &std);
1030 if (btv->c.type == BTTV_BOARD_VOODOOTV_FM) 1029 if (btv->c.type == BTTV_BOARD_VOODOOTV_FM)
1031 bttv_tda9880_setnorm(btv,btv->tvnorm); 1030 bttv_tda9880_setnorm(btv,btv->tvnorm);
@@ -1603,12 +1602,16 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1603 } 1602 }
1604 case VIDIOCSFREQ: 1603 case VIDIOCSFREQ:
1605 { 1604 {
1606 unsigned long *freq = arg; 1605 struct v4l2_frequency freq;
1606
1607 memset(&freq, 0, sizeof(freq));
1608 freq.frequency = *(unsigned long *)arg;
1607 mutex_lock(&btv->lock); 1609 mutex_lock(&btv->lock);
1608 btv->freq=*freq; 1610 freq.type = btv->radio_user ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
1609 bttv_call_i2c_clients(btv,VIDIOCSFREQ,freq); 1611 btv->freq = *(unsigned long *)arg;
1612 bttv_call_i2c_clients(btv,VIDIOC_S_FREQUENCY,&freq);
1610 if (btv->has_matchbox && btv->radio_user) 1613 if (btv->has_matchbox && btv->radio_user)
1611 tea5757_set_freq(btv,*freq); 1614 tea5757_set_freq(btv,*(unsigned long *)arg);
1612 mutex_unlock(&btv->lock); 1615 mutex_unlock(&btv->lock);
1613 return 0; 1616 return 0;
1614 } 1617 }