From e99d3438e4db1ef9e4cae5ad3946c76f4ffd268d Mon Sep 17 00:00:00 2001 From: Jiri Benc Date: Fri, 6 May 2005 21:30:42 -0700 Subject: [PATCH] [PATCH] video/tuner: fix tuner->freq updating In VIDIOC_S_FREQUENCY command in tuner-core.c, t->freq is set to a new value before calling set_freq(). This is not necessary, as set_freq() sets t->freq itself. Moreover, it causes problems with Philips tuners, as they need to take into consideration difference between previous and new frequency. Signed-off-by: Jiri Benc Cc: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/tuner-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 881a0539fc..c7d0c9f093 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -357,8 +357,7 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) V4L2_TUNER_RADIO != t->mode) set_tv_freq(client,400*16); t->mode = f->type; - t->freq = f->frequency; - set_freq(client,t->freq); + set_freq(client,f->frequency); break; } case VIDIOC_G_TUNER: -- 2.39.5