All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi
@ 2011-08-10  8:24 Axel Lin
  2011-08-10 15:37   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-08-10  8:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel

In the case of "make da8xx_omapl_defconfig;make", the SPI support is disabled.
Thus calling regmap_init_spi in soc-io.c has below build error.

ERROR: "regmap_init_spi" [sound/soc/snd-soc-core.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This patch fixes the build error by adding CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI
guards for regmap_init_i2c/regmap_init_spi.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/soc-io.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index e471ed6..be5aac3 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -122,15 +122,19 @@ 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 */
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi
  2011-08-10  8:24 [PATCH] ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi Axel Lin
@ 2011-08-10 15:37   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-08-10 15:37 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, alsa-devel

On Wed, Aug 10, 2011 at 04:24:12PM +0800, Axel Lin wrote:
> In the case of "make da8xx_omapl_defconfig;make", the SPI support is disabled.
> Thus calling regmap_init_spi in soc-io.c has below build error.

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi
@ 2011-08-10 15:37   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-08-10 15:37 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, linux-kernel, Liam Girdwood

On Wed, Aug 10, 2011 at 04:24:12PM +0800, Axel Lin wrote:
> In the case of "make da8xx_omapl_defconfig;make", the SPI support is disabled.
> Thus calling regmap_init_spi in soc-io.c has below build error.

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-10 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10  8:24 [PATCH] ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi Axel Lin
2011-08-10 15:37 ` Mark Brown
2011-08-10 15:37   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.