From: Vasily Khoruzhick <anarsoul@gmail.com>
To: Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org,
Jassi Brar <jassisinghbrar@gmail.com>
Cc: Vasily Khoruzhick <anarsoul@gmail.com>
Subject: [PATCH 1/3] soc/soc-io.c: Use regmap_init_{i2c, spi} only if it's available
Date: Fri, 12 Aug 2011 17:52:58 +0300 [thread overview]
Message-ID: <1313160780-20633-1-git-send-email-anarsoul@gmail.com> (raw)
Otherwise we get linker error like:
ERROR: "regmap_init_spi" [sound/soc/snd-soc-core.ko] undefined!
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
sound/soc/soc-io.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index e471ed6..c1565e4 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -122,16 +122,18 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
config.val_bits = data_bits;
switch (control) {
+#ifdef CONFIG_REGMAP_I2C
case SND_SOC_I2C:
codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev),
&config);
break;
-
+#endif
+#ifdef CONFIG_REGMAP_SPI
case SND_SOC_SPI:
codec->control_data = regmap_init_spi(to_spi_device(codec->dev),
&config);
break;
-
+#endif
case SND_SOC_REGMAP:
/* Device has made its own regmap arrangements */
break;
--
1.7.5.rc3
next reply other threads:[~2011-08-12 14:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 14:52 Vasily Khoruzhick [this message]
2011-08-12 14:52 ` [PATCH 2/3] ASoC: h1940: Fix compilation error due to missing header Vasily Khoruzhick
2011-08-13 7:07 ` Jassi Brar
2011-08-14 10:23 ` Mark Brown
2011-08-12 14:53 ` [PATCH 3/3] ASoC: rx1950: " Vasily Khoruzhick
2011-08-12 14:59 ` [PATCH 1/3] soc/soc-io.c: Use regmap_init_{i2c, spi} only if it's available 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=1313160780-20633-1-git-send-email-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jassisinghbrar@gmail.com \
--cc=lrg@ti.com \
/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