ALSA: tea575x: remove freq_fixup from struct
authorOndrej Zary <linux@rainbow-software.org>
Thu, 12 May 2011 20:17:56 +0000 (22:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 13 May 2011 17:43:01 +0000 (19:43 +0200)
freq_fixup is a constant, no need to hold it in struct snd_tea575x and set in
each driver.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/tea575x-tuner.h
sound/i2c/other/tea575x-tuner.c
sound/pci/es1968.c
sound/pci/fm801.c

index e50cb2934efe680363445cd612dceaeefe413cc1..0291f48e035e75ab897755614af878186c32f6ac 100644 (file)
@@ -26,6 +26,8 @@
 #include <media/v4l2-dev.h>
 #include <media/v4l2-ioctl.h>
 
+#define TEA575X_FMIF   10700
+
 #define TEA575X_DATA   (1 << 0)
 #define TEA575X_CLK    (1 << 1)
 #define TEA575X_WREN   (1 << 2)
@@ -46,7 +48,6 @@ struct snd_tea575x {
        bool mute;                      /* Device is muted? */
        bool stereo;                    /* receiving stereo */
        bool tuned;                     /* tuned to a station */
-       unsigned int freq_fixup;        /* crystal onboard */
        unsigned int val;               /* hw value */
        unsigned long freq;             /* frequency */
        unsigned long in_use;           /* set if the device is in use */
index 31f9795daca673160cd0f43eb3cfe5eb9ea03021..98ccec27e7bf17400a83b42e14beb5e0fab5a71d 100644 (file)
@@ -141,9 +141,9 @@ static void snd_tea575x_get_freq(struct snd_tea575x *tea)
        freq /= 10;
        /* crystal fixup */
        if (tea->tea5759)
-               freq += tea->freq_fixup;
+               freq += TEA575X_FMIF;
        else
-               freq -= tea->freq_fixup;
+               freq -= TEA575X_FMIF;
 
        tea->freq = freq * 16;          /* from kHz */
 }
@@ -156,9 +156,9 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea)
        freq /= 16;             /* to kHz */
        /* crystal fixup */
        if (tea->tea5759)
-               freq -= tea->freq_fixup;
+               freq -= TEA575X_FMIF;
        else
-               freq += tea->freq_fixup;
+               freq += TEA575X_FMIF;
        /* freq /= 12.5 */
        freq *= 10;
        freq /= 125;
index 75c5e0ed695564f7d14dbad35b34bf4a12d0658b..3f3ff1bae814a94014b8d871d1779499b1fb65a0 100644 (file)
@@ -2794,7 +2794,6 @@ static int __devinit snd_es1968_create(struct snd_card *card,
 
 #ifdef CONFIG_SND_ES1968_RADIO
        chip->tea.card = card;
-       chip->tea.freq_fixup = 10700;
        chip->tea.private_data = chip;
        chip->tea.ops = &snd_es1968_tea_ops;
        if (!snd_tea575x_init(&chip->tea))
index 5aa3fd6f25f7c7173b683bbab562e8e687b6f2f7..1d4e71cc18b63d33d8405a9888bf01e6f54261cc 100644 (file)
@@ -1231,7 +1231,6 @@ static int __devinit snd_fm801_create(struct snd_card *card,
 
 #ifdef TEA575X_RADIO
        chip->tea.card = card;
-       chip->tea.freq_fixup = 10700;
        chip->tea.private_data = chip;
        chip->tea.ops = &snd_fm801_tea_ops;
        if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 &&