* [PATCH] ali5451: remove dead code
@ 2009-08-19 20:09 Bartlomiej Zolnierkiewicz
2009-08-23 17:01 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-08-19 20:09 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ali5451: remove dead code
Remove code covered by #if/endif 0 and #ifdef/endif CODEC_RESET
(CODEC_RESET is never defined).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
sound/pci/ali5451/ali5451.c | 65 --------------------------------------------
1 file changed, 65 deletions(-)
Index: b/sound/pci/ali5451/ali5451.c
===================================================================
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -477,45 +477,6 @@ static int snd_ali_reset_5451(struct snd
return 0;
}
-#ifdef CODEC_RESET
-
-static int snd_ali_reset_codec(struct snd_ali *codec)
-{
- struct pci_dev *pci_dev;
- unsigned char bVal;
- unsigned int dwVal;
- unsigned short wCount, wReg;
-
- pci_dev = codec->pci_m1533;
-
- pci_read_config_dword(pci_dev, 0x7c, &dwVal);
- pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
- udelay(5000);
- pci_read_config_dword(pci_dev, 0x7c, &dwVal);
- pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff);
- udelay(5000);
-
- bVal = inb(ALI_REG(codec,ALI_SCTRL));
- bVal |= 0x02;
- outb(ALI_REG(codec,ALI_SCTRL),bVal);
- udelay(5000);
- bVal = inb(ALI_REG(codec,ALI_SCTRL));
- bVal &= 0xfd;
- outb(ALI_REG(codec,ALI_SCTRL),bVal);
- udelay(15000);
-
- wCount = 200;
- while (wCount--) {
- wReg = snd_ali_codec_read(codec->ac97, AC97_POWERDOWN);
- if ((wReg & 0x000f) == 0x000f)
- return 0;
- udelay(5000);
- }
- return -1;
-}
-
-#endif
-
/*
* ALI 5451 Controller
*/
@@ -560,22 +521,6 @@ static void snd_ali_disable_address_inte
outl(gc, ALI_REG(codec, ALI_GC_CIR));
}
-#if 0 /* not used */
-static void snd_ali_enable_voice_irq(struct snd_ali *codec,
- unsigned int channel)
-{
- unsigned int mask;
- struct snd_ali_channel_control *pchregs = &(codec->chregs);
-
- snd_ali_printk("enable_voice_irq channel=%d\n",channel);
-
- mask = 1 << (channel & 0x1f);
- pchregs->data.ainten = inl(ALI_REG(codec, pchregs->regs.ainten));
- pchregs->data.ainten |= mask;
- outl(pchregs->data.ainten, ALI_REG(codec, pchregs->regs.ainten));
-}
-#endif
-
static void snd_ali_disable_voice_irq(struct snd_ali *codec,
unsigned int channel)
{
@@ -676,16 +621,6 @@ static void snd_ali_free_channel_pcm(str
}
}
-#if 0 /* not used */
-static void snd_ali_start_voice(struct snd_ali *codec, unsigned int channel)
-{
- unsigned int mask = 1 << (channel & 0x1f);
-
- snd_ali_printk("start_voice: channel=%d\n",channel);
- outl(mask, ALI_REG(codec,codec->chregs.regs.start));
-}
-#endif
-
static void snd_ali_stop_voice(struct snd_ali *codec, unsigned int channel)
{
unsigned int mask = 1 << (channel & 0x1f);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ali5451: remove dead code
2009-08-19 20:09 [PATCH] ali5451: remove dead code Bartlomiej Zolnierkiewicz
@ 2009-08-23 17:01 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-08-23 17:01 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: alsa-devel, linux-kernel
At Wed, 19 Aug 2009 22:09:55 +0200,
Bartlomiej Zolnierkiewicz wrote:
>
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ali5451: remove dead code
>
> Remove code covered by #if/endif 0 and #ifdef/endif CODEC_RESET
> (CODEC_RESET is never defined).
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Applied now. Thanks!
Takashi
> ---
> sound/pci/ali5451/ali5451.c | 65 --------------------------------------------
> 1 file changed, 65 deletions(-)
>
> Index: b/sound/pci/ali5451/ali5451.c
> ===================================================================
> --- a/sound/pci/ali5451/ali5451.c
> +++ b/sound/pci/ali5451/ali5451.c
> @@ -477,45 +477,6 @@ static int snd_ali_reset_5451(struct snd
> return 0;
> }
>
> -#ifdef CODEC_RESET
> -
> -static int snd_ali_reset_codec(struct snd_ali *codec)
> -{
> - struct pci_dev *pci_dev;
> - unsigned char bVal;
> - unsigned int dwVal;
> - unsigned short wCount, wReg;
> -
> - pci_dev = codec->pci_m1533;
> -
> - pci_read_config_dword(pci_dev, 0x7c, &dwVal);
> - pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
> - udelay(5000);
> - pci_read_config_dword(pci_dev, 0x7c, &dwVal);
> - pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff);
> - udelay(5000);
> -
> - bVal = inb(ALI_REG(codec,ALI_SCTRL));
> - bVal |= 0x02;
> - outb(ALI_REG(codec,ALI_SCTRL),bVal);
> - udelay(5000);
> - bVal = inb(ALI_REG(codec,ALI_SCTRL));
> - bVal &= 0xfd;
> - outb(ALI_REG(codec,ALI_SCTRL),bVal);
> - udelay(15000);
> -
> - wCount = 200;
> - while (wCount--) {
> - wReg = snd_ali_codec_read(codec->ac97, AC97_POWERDOWN);
> - if ((wReg & 0x000f) == 0x000f)
> - return 0;
> - udelay(5000);
> - }
> - return -1;
> -}
> -
> -#endif
> -
> /*
> * ALI 5451 Controller
> */
> @@ -560,22 +521,6 @@ static void snd_ali_disable_address_inte
> outl(gc, ALI_REG(codec, ALI_GC_CIR));
> }
>
> -#if 0 /* not used */
> -static void snd_ali_enable_voice_irq(struct snd_ali *codec,
> - unsigned int channel)
> -{
> - unsigned int mask;
> - struct snd_ali_channel_control *pchregs = &(codec->chregs);
> -
> - snd_ali_printk("enable_voice_irq channel=%d\n",channel);
> -
> - mask = 1 << (channel & 0x1f);
> - pchregs->data.ainten = inl(ALI_REG(codec, pchregs->regs.ainten));
> - pchregs->data.ainten |= mask;
> - outl(pchregs->data.ainten, ALI_REG(codec, pchregs->regs.ainten));
> -}
> -#endif
> -
> static void snd_ali_disable_voice_irq(struct snd_ali *codec,
> unsigned int channel)
> {
> @@ -676,16 +621,6 @@ static void snd_ali_free_channel_pcm(str
> }
> }
>
> -#if 0 /* not used */
> -static void snd_ali_start_voice(struct snd_ali *codec, unsigned int channel)
> -{
> - unsigned int mask = 1 << (channel & 0x1f);
> -
> - snd_ali_printk("start_voice: channel=%d\n",channel);
> - outl(mask, ALI_REG(codec,codec->chregs.regs.start));
> -}
> -#endif
> -
> static void snd_ali_stop_voice(struct snd_ali *codec, unsigned int channel)
> {
> unsigned int mask = 1 << (channel & 0x1f);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-23 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 20:09 [PATCH] ali5451: remove dead code Bartlomiej Zolnierkiewicz
2009-08-23 17:01 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox