]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tea5767.c
V4L/DVB (5170): Pvrusb2: Add boilerplate to new header file
[linux-2.6-omap-h63xx.git] / drivers / media / video / tea5767.c
index 921fe72f23d5f2bacdf7cf4a0e2e7a9b0cc8e33e..d1c41781ccc47dd3dd00ea8d7d5d15f3a6dd5cda 100644 (file)
@@ -3,7 +3,7 @@
  * I2C address is allways 0xC0.
  *
  *
- * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br)
+ * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@infradead.org)
  * This code is placed under the terms of the GNU General Public License
  *
  * tea5767 autodetection thanks to Torsten Seeboth and Atsushi Nakagawa
@@ -62,7 +62,7 @@ extern int tuner_debug;
 
 #define TEA5767_PORT1_HIGH     0x01
 
-/* Forth register */
+/* Fourth register */
 #define TEA5767_PORT2_HIGH     0x80
 /* Chips stops working. Only I2C bus remains on */
 #define TEA5767_STDBY          0x40
@@ -85,7 +85,7 @@ extern int tuner_debug;
 /* If activate PORT 1 indicates SEARCH or else it is used as PORT1 */
 #define TEA5767_SRCH_IND       0x01
 
-/* Fiveth register */
+/* Fifth register */
 
 /* By activating, it will use Xtal at 13 MHz as reference for divider */
 #define TEA5767_PLLREF_ENABLE  0x80
@@ -109,13 +109,13 @@ extern int tuner_debug;
 #define TEA5767_STEREO_MASK    0x80
 #define TEA5767_IF_CNTR_MASK   0x7f
 
-/* Four register */
+/* Fourth register */
 #define TEA5767_ADC_LEVEL_MASK 0xf0
 
 /* should be 0 */
 #define TEA5767_CHIP_ID_MASK   0x0f
 
-/* Fiveth register */
+/* Fifth register */
 /* Reserved for future extensions */
 #define TEA5767_RESERVED_MASK  0xff
 
@@ -220,19 +220,19 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
                tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");
                buffer[2] |= TEA5767_HIGH_LO_INJECT;
                buffer[4] |= TEA5767_PLLREF_ENABLE;
-               div = (frq * 4000 / 16 + 700000 + 225000 + 25000) / 50000;
+               div = (frq * (4000 / 16) + 700000 + 225000 + 25000) / 50000;
                break;
        case TEA5767_LOW_LO_13MHz:
                tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n");
 
                buffer[4] |= TEA5767_PLLREF_ENABLE;
-               div = (frq * 4000 / 16 - 700000 - 225000 + 25000) / 50000;
+               div = (frq * (4000 / 16) - 700000 - 225000 + 25000) / 50000;
                break;
        case TEA5767_LOW_LO_32768:
                tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n");
                buffer[3] |= TEA5767_XTAL_32768;
                /* const 700=4000*175 Khz - to adjust freq to right value */
-               div = ((frq * 4000 / 16 - 700000 - 225000) + 16384) >> 15;
+               div = ((frq * (4000 / 16) - 700000 - 225000) + 16384) >> 15;
                break;
        case TEA5767_HIGH_LO_32768:
        default:
@@ -350,8 +350,8 @@ int tea5767_tuner_init(struct i2c_client *c)
        tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio");
        strlcpy(c->name, "tea5767", sizeof(c->name));
 
-       t->tv_freq = set_tv_freq;
-       t->radio_freq = set_radio_freq;
+       t->set_tv_freq = set_tv_freq;
+       t->set_radio_freq = set_radio_freq;
        t->has_signal = tea5767_signal;
        t->is_stereo = tea5767_stereo;
        t->standby = tea5767_standby;