From bbcda9e343d5032eb25b5630d973b5dd275db73d Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Thu, 31 Jan 2019 22:31:50 +0000
Subject: [PATCH] ALSA: hda/tegra: fix implicit-function-declaration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix the following buidl error:

sound/pci/hda/hda_tegra.c: In function ‘hda_tegra_runtime_suspend’:
sound/pci/hda/hda_tegra.c:273:2: error: implicit declaration of function ‘hda_tegra_disable_clocks’; did you mean ‘hda_tegra_enable_clocks’? [-Werror=implicit-function-declaration]
  hda_tegra_disable_clocks(hda);
  ^~~~~~~~~~~~~~~~~~~~~~~~

Rework so '#ifdef CONFIG_PM' is around function 'hda_tegra_disable_clocks'.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 sound/pci/hda/hda_tegra.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index dbd8da5685cb..68c2fb897c11 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -219,14 +219,16 @@ static int hda_tegra_enable_clocks(struct hda_tegra *data)
 	return rc;
 }
 
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_PM
 static void hda_tegra_disable_clocks(struct hda_tegra *data)
 {
 	clk_disable_unprepare(data->hda2hdmi_clk);
 	clk_disable_unprepare(data->hda2codec_2x_clk);
 	clk_disable_unprepare(data->hda_clk);
 }
+#endif
 
+#ifdef CONFIG_PM_SLEEP
 /*
  * power management
  */
-- 
2.19.2

