[alsa-devel] [PATCH 7/7] ASoC: Samsung: smdk_wm8994: Fix unused variable warning

Sachin Kamat sachin.kamat at linaro.org
Wed Jan 22 07:13:33 CET 2014


‘smdk_board_data’ is required only when OF is enabled. Move it to avoid
the following build warning:
sound/soc/samsung/smdk_wm8994.c:47:32: warning: ‘smdk_board_data’ defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
---
 sound/soc/samsung/smdk_wm8994.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 1d9641cc172a..a0268fc0a3d9 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -43,11 +43,6 @@ struct smdk_wm8994_data {
 	int mclk1_rate;
 };
 
-/* Default SMDKs */
-static struct smdk_wm8994_data smdk_board_data = {
-	.mclk1_rate = SMDK_WM8994_FREQ,
-};
-
 static int smdk_hw_params(struct snd_pcm_substream *substream,
 	struct snd_pcm_hw_params *params)
 {
@@ -153,6 +148,11 @@ static struct snd_soc_card smdk = {
 };
 
 #ifdef CONFIG_OF
+/* Default SMDKs */
+static struct smdk_wm8994_data smdk_board_data = {
+	.mclk1_rate = SMDK_WM8994_FREQ,
+};
+
 static const struct of_device_id samsung_wm8994_of_match[] = {
 	{ .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data },
 	{},
-- 
1.7.9.5



More information about the Alsa-devel mailing list