[alsa-devel] [PATCH] ASoC: rt5640: ifdef for ACPI module table

Olof Johansson olof at lixom.net
Wed Sep 18 08:10:24 CEST 2013


Commit 02b80773de37 (ASoC: rt5640: Add ACPI probing support.) causes
a warning due to unreferenced variable on non-ACPI configs such as
tegra_defconfig on ARM:

  sound/soc/codecs/rt5640.c:2085:30: warning: 'rt5640_acpi_match' defined but not used [-Wunused-variable]

Signed-off-by: Olof Johansson <olof at lixom.net>
---
 sound/soc/codecs/rt5640.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 0bfb960..a856706 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2082,11 +2082,13 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
 
+#if CONFIG_ACPI
 static struct acpi_device_id rt5640_acpi_match[] = {
 	{ "INT33CA", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
+#endif
 
 static int rt5640_parse_dt(struct rt5640_priv *rt5640, struct device_node *np)
 {
-- 
1.7.10.4



More information about the Alsa-devel mailing list