summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/tda8290.c9
1 files changed, 5 insertions, 4 deletions
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);