diff mbox

ALSA: hda: Fix build warning

Message ID 1404738792-20344-1-git-send-email-thierry.reding@gmail.com
State Not Applicable, archived
Headers show

Commit Message

Thierry Reding July 7, 2014, 1:13 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

The hda_tegra_disable_clocks() function is only used by the suspend and
resume code, so it needs to be included in the #ifdef CONFIG_PM_SLEEP
block to prevent the following warning:

  CC      sound/pci/hda/hda_tegra.o
sound/pci/hda/hda_tegra.c:238:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function]
 static void hda_tegra_disable_clocks(struct hda_tegra *data)
             ^

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 sound/pci/hda/hda_tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai July 7, 2014, 1:16 p.m. UTC | #1
At Mon,  7 Jul 2014 15:13:12 +0200,
Thierry Reding wrote:
> 
> From: Thierry Reding <treding@nvidia.com>
> 
> The hda_tegra_disable_clocks() function is only used by the suspend and
> resume code, so it needs to be included in the #ifdef CONFIG_PM_SLEEP
> block to prevent the following warning:
> 
>   CC      sound/pci/hda/hda_tegra.o
> sound/pci/hda/hda_tegra.c:238:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function]
>  static void hda_tegra_disable_clocks(struct hda_tegra *data)
>              ^
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/hda/hda_tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
> index dc4bb21ed17b..227990bc02e3 100644
> --- a/sound/pci/hda/hda_tegra.c
> +++ b/sound/pci/hda/hda_tegra.c
> @@ -235,6 +235,7 @@ disable_hda:
>  	return rc;
>  }
>  
> +#ifdef CONFIG_PM_SLEEP
>  static void hda_tegra_disable_clocks(struct hda_tegra *data)
>  {
>  	clk_disable_unprepare(data->hda2hdmi_clk);
> @@ -242,7 +243,6 @@ static void hda_tegra_disable_clocks(struct hda_tegra *data)
>  	clk_disable_unprepare(data->hda_clk);
>  }
>  
> -#ifdef CONFIG_PM_SLEEP
>  /*
>   * power management
>   */
> -- 
> 2.0.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index dc4bb21ed17b..227990bc02e3 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -235,6 +235,7 @@  disable_hda:
 	return rc;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void hda_tegra_disable_clocks(struct hda_tegra *data)
 {
 	clk_disable_unprepare(data->hda2hdmi_clk);
@@ -242,7 +243,6 @@  static void hda_tegra_disable_clocks(struct hda_tegra *data)
 	clk_disable_unprepare(data->hda_clk);
 }
 
-#ifdef CONFIG_PM_SLEEP
 /*
  * power management
  */