diff mbox

ALSA: ice1712: wm8766: Remove some unused functions

Message ID 1420990300-19672-1-git-send-email-rickard_strandqvist@spectrumdigital.se (mailing list archive)
State Accepted
Commit ace79a3592bee97406c88c3d856e16b7f5720a39
Headers show

Commit Message

Rickard Strandqvist Jan. 11, 2015, 3:31 p.m. UTC
Removes some functions that are not used anywhere:
snd_wm8766_set_power() snd_wm8766_set_master_mode()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 sound/pci/ice1712/wm8766.c |   16 ----------------
 sound/pci/ice1712/wm8766.h |    2 --
 2 files changed, 18 deletions(-)

Comments

Takashi Iwai Jan. 11, 2015, 4:04 p.m. UTC | #1
At Sun, 11 Jan 2015 16:31:40 +0100,
Rickard Strandqvist wrote:
> 
> Removes some functions that are not used anywhere:
> snd_wm8766_set_power() snd_wm8766_set_master_mode()
> 
> This was partially found by using a static code analysis program called cppcheck.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

Applied, thanks.


Takashi

> ---
>  sound/pci/ice1712/wm8766.c |   16 ----------------
>  sound/pci/ice1712/wm8766.h |    2 --
>  2 files changed, 18 deletions(-)
> 
> diff --git a/sound/pci/ice1712/wm8766.c b/sound/pci/ice1712/wm8766.c
> index 21b373b..f7ac8d5 100644
> --- a/sound/pci/ice1712/wm8766.c
> +++ b/sound/pci/ice1712/wm8766.c
> @@ -183,22 +183,6 @@ void snd_wm8766_set_if(struct snd_wm8766 *wm, u16 dac)
>  	snd_wm8766_write(wm, WM8766_REG_IFCTRL, val | dac);
>  }
>  
> -void snd_wm8766_set_master_mode(struct snd_wm8766 *wm, u16 mode)
> -{
> -	u16 val = wm->regs[WM8766_REG_DACCTRL3] & ~WM8766_DAC3_MSTR_MASK;
> -
> -	mode &= WM8766_DAC3_MSTR_MASK;
> -	snd_wm8766_write(wm, WM8766_REG_DACCTRL3, val | mode);
> -}
> -
> -void snd_wm8766_set_power(struct snd_wm8766 *wm, u16 power)
> -{
> -	u16 val = wm->regs[WM8766_REG_DACCTRL3] & ~WM8766_DAC3_POWER_MASK;
> -
> -	power &= WM8766_DAC3_POWER_MASK;
> -	snd_wm8766_write(wm, WM8766_REG_DACCTRL3, val | power);
> -}
> -
>  void snd_wm8766_volume_restore(struct snd_wm8766 *wm)
>  {
>  	u16 val = wm->regs[WM8766_REG_DACR1];
> diff --git a/sound/pci/ice1712/wm8766.h b/sound/pci/ice1712/wm8766.h
> index c119f84..18c8d9d 100644
> --- a/sound/pci/ice1712/wm8766.h
> +++ b/sound/pci/ice1712/wm8766.h
> @@ -155,8 +155,6 @@ struct snd_wm8766 {
>  void snd_wm8766_init(struct snd_wm8766 *wm);
>  void snd_wm8766_resume(struct snd_wm8766 *wm);
>  void snd_wm8766_set_if(struct snd_wm8766 *wm, u16 dac);
> -void snd_wm8766_set_master_mode(struct snd_wm8766 *wm, u16 mode);
> -void snd_wm8766_set_power(struct snd_wm8766 *wm, u16 power);
>  void snd_wm8766_volume_restore(struct snd_wm8766 *wm);
>  int snd_wm8766_build_controls(struct snd_wm8766 *wm);
>  
> -- 
> 1.7.10.4
>
diff mbox

Patch

diff --git a/sound/pci/ice1712/wm8766.c b/sound/pci/ice1712/wm8766.c
index 21b373b..f7ac8d5 100644
--- a/sound/pci/ice1712/wm8766.c
+++ b/sound/pci/ice1712/wm8766.c
@@ -183,22 +183,6 @@  void snd_wm8766_set_if(struct snd_wm8766 *wm, u16 dac)
 	snd_wm8766_write(wm, WM8766_REG_IFCTRL, val | dac);
 }
 
-void snd_wm8766_set_master_mode(struct snd_wm8766 *wm, u16 mode)
-{
-	u16 val = wm->regs[WM8766_REG_DACCTRL3] & ~WM8766_DAC3_MSTR_MASK;
-
-	mode &= WM8766_DAC3_MSTR_MASK;
-	snd_wm8766_write(wm, WM8766_REG_DACCTRL3, val | mode);
-}
-
-void snd_wm8766_set_power(struct snd_wm8766 *wm, u16 power)
-{
-	u16 val = wm->regs[WM8766_REG_DACCTRL3] & ~WM8766_DAC3_POWER_MASK;
-
-	power &= WM8766_DAC3_POWER_MASK;
-	snd_wm8766_write(wm, WM8766_REG_DACCTRL3, val | power);
-}
-
 void snd_wm8766_volume_restore(struct snd_wm8766 *wm)
 {
 	u16 val = wm->regs[WM8766_REG_DACR1];
diff --git a/sound/pci/ice1712/wm8766.h b/sound/pci/ice1712/wm8766.h
index c119f84..18c8d9d 100644
--- a/sound/pci/ice1712/wm8766.h
+++ b/sound/pci/ice1712/wm8766.h
@@ -155,8 +155,6 @@  struct snd_wm8766 {
 void snd_wm8766_init(struct snd_wm8766 *wm);
 void snd_wm8766_resume(struct snd_wm8766 *wm);
 void snd_wm8766_set_if(struct snd_wm8766 *wm, u16 dac);
-void snd_wm8766_set_master_mode(struct snd_wm8766 *wm, u16 mode);
-void snd_wm8766_set_power(struct snd_wm8766 *wm, u16 power);
 void snd_wm8766_volume_restore(struct snd_wm8766 *wm);
 int snd_wm8766_build_controls(struct snd_wm8766 *wm);