ASoC: rt5640: Omit ACPI match table only if !ACPI
authorThierry Reding <thierry.reding@gmail.com>
Thu, 19 Sep 2013 09:18:06 +0000 (11:18 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 19 Sep 2013 10:41:03 +0000 (11:41 +0100)
The ACPI_PTR() macro evaluates to NULL if ACPI is disabled and hence the
ACPI match table won't be used, causing the compiler to complain. Avoid
this by protecting the table using an #ifdef CONFIG_ACPI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/rt5640.c

index 0bfb960e90f804af6f246f0e61cf4e5f0f1fc340..641eeeb00c5c4170ca9fff1307337d02f1532163 100644 (file)
@@ -2082,11 +2082,13 @@ static const struct i2c_device_id rt5640_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
 
+#ifdef 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)
 {