From e8ad93aa97256c5a1bec410faebb0b8fe4ca0531 Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Sat, 18 Jun 2005 06:09:06 +0000 Subject: Anoter tunning fix --- linux/drivers/media/video/tda8290.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/video/tda8290.c') diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c index ffae1bbfe..6a25be565 100644 --- a/linux/drivers/media/video/tda8290.c +++ b/linux/drivers/media/video/tda8290.c @@ -1,5 +1,5 @@ /* - * $Id: tda8290.c,v 1.10 2005/06/18 06:04:01 nsh Exp $ + * $Id: tda8290.c,v 1.11 2005/06/18 06:09:06 nsh Exp $ * * i2c tv tuner chip device driver * controls the philips tda8290+75 tuner chip combo. @@ -139,15 +139,16 @@ static int tda8290_tune(struct i2c_client *c) static void set_frequency(struct tuner *t, u16 ifc) { - __u16 freq; - - u32 N = (((t->freq<<3)+ifc)&0x3fffc); + u32 freq; + u32 N; if (t->mode == V4L2_TUNER_RADIO) freq = t->freq / 1000; else freq = t->freq; + N = (((freq<<3)+ifc)&0x3fffc); + N = N >> get_freq_entry(div_table, freq); t->i2c_set_freq[0] = 0; t->i2c_set_freq[1] = (unsigned char)(N>>8); -- cgit v1.2.3