From: Thierry Reding <thierry.reding@gmail.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: rt5640: Omit ACPI match table only if !ACPI
Date: Thu, 19 Sep 2013 11:18:06 +0200 [thread overview]
Message-ID: <1379582286-10600-1-git-send-email-treding@nvidia.com> (raw)
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>
---
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..641eeeb 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);
+#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)
{
--
1.8.4
next reply other threads:[~2013-09-19 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 9:18 Thierry Reding [this message]
2013-09-19 10:45 ` [PATCH] ASoC: rt5640: Omit ACPI match table only if !ACPI Mark Brown
2013-09-19 11:21 ` Thierry Reding
2013-09-19 13:22 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379582286-10600-1-git-send-email-treding@nvidia.com \
--to=thierry.reding@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox