ChangeSet 1.2181.25.35, 2005/03/24 11:44:51+01:00, [EMAIL PROTECTED]
[ALSA] Remove unnecessary ac97 init code
VIA82xx driver,VIA82xx-modem driver
Removed unnecessary ac97 init code in snd_via82xx_chip_init().
This reduces eventually the big stack usage, too.
Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
via82xx.c | 9 ---------
via82xx_modem.c | 11 -----------
2 files changed, 20 deletions(-)
diff -Nru a/sound/pci/via82xx.c b/sound/pci/via82xx.c
--- a/sound/pci/via82xx.c 2005-03-30 16:17:32 -08:00
+++ b/sound/pci/via82xx.c 2005-03-30 16:17:32 -08:00
@@ -1838,14 +1838,10 @@
static int __devinit snd_via82xx_chip_init(via82xx_t *chip)
{
- ac97_t ac97;
unsigned int val;
int max_count;
unsigned char pval;
- memset(&ac97, 0, sizeof(ac97));
- ac97.private_data = chip;
-
#if 0 /* broken on K7M? */
if (chip->chip_type == TYPE_VIA686)
/* disable all legacy ports */
@@ -1896,11 +1892,6 @@
if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
snd_printk("AC'97 codec is not ready [0x%x]\n", val);
-
- /* and then reset codec.. */
- snd_via82xx_codec_ready(chip, 0);
- snd_via82xx_codec_write(&ac97, AC97_RESET, 0x0000);
- snd_via82xx_codec_read(&ac97, 0);
#if 0 /* FIXME: we don't support the second codec yet so skip the detection
now.. */
snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ |
diff -Nru a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
--- a/sound/pci/via82xx_modem.c 2005-03-30 16:17:32 -08:00
+++ b/sound/pci/via82xx_modem.c 2005-03-30 16:17:32 -08:00
@@ -940,14 +940,10 @@
static int __devinit snd_via82xx_chip_init(via82xx_t *chip)
{
- ac97_t ac97;
unsigned int val;
int max_count;
unsigned char pval;
- memset(&ac97, 0, sizeof(ac97));
- ac97.private_data = chip;
-
pci_read_config_byte(chip->pci, VIA_MC97_CTRL, &pval);
if((pval & VIA_MC97_CTRL_INIT) != VIA_MC97_CTRL_INIT) {
pci_write_config_byte(chip->pci, 0x44, pval|VIA_MC97_CTRL_INIT);
@@ -995,13 +991,6 @@
if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
snd_printk("AC'97 codec is not ready [0x%x]\n", val);
-
- /* and then reset codec.. */
-#if 0 /* do we need it? when? */
- snd_via82xx_codec_ready(chip, 0);
- snd_via82xx_codec_write(&ac97, AC97_RESET, 0x0000);
- snd_via82xx_codec_read(&ac97, 0);
-#endif
snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ |
VIA_REG_AC97_SECONDARY_VALID |
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html