Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regmap: Specify a module license
@ 2011-08-11 17:59 Stephen Warren
  2011-08-11 17:59 ` [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules Stephen Warren
  2011-08-12  1:43 ` [PATCH 1/2] regmap: Specify a module license Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Warren @ 2011-08-11 17:59 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Stephen Warren

CONFIG_REGMAP_I2C/SPI are set to m when selected by a tristate config
option that's set to m. The regmap modules don't specify a license, so
fail to link to regmap_init at load time, since that is EXPORT_SYMBOL_GPL.
Fix this by specifying a license for the regmap modules.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/base/regmap/regmap-i2c.c |    1 +
 drivers/base/regmap/regmap-spi.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
index e6ce82d..e7d916d 100644
--- a/drivers/base/regmap/regmap-i2c.c
+++ b/drivers/base/regmap/regmap-i2c.c
@@ -112,3 +112,4 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c,
 }
 EXPORT_SYMBOL_GPL(regmap_init_i2c);
 
+MODULE_LICENSE("GPL");
diff --git a/drivers/base/regmap/regmap-spi.c b/drivers/base/regmap/regmap-spi.c
index 07633bd..cc0f116 100644
--- a/drivers/base/regmap/regmap-spi.c
+++ b/drivers/base/regmap/regmap-spi.c
@@ -69,3 +69,5 @@ struct regmap *regmap_init_spi(struct spi_device *spi,
 	return regmap_init(&spi->dev, &regmap_spi, config);
 }
 EXPORT_SYMBOL_GPL(regmap_init_spi);
+
+MODULE_LICENSE("GPL");
-- 
1.7.0.4

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

* [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules
  2011-08-11 17:59 [PATCH 1/2] regmap: Specify a module license Stephen Warren
@ 2011-08-11 17:59 ` Stephen Warren
  2011-08-12  2:55   ` Mark Brown
  2011-08-12  1:43 ` [PATCH 1/2] regmap: Specify a module license Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2011-08-11 17:59 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Stephen Warren

When CONFIG_REGMAP_I2C/SPI are m, CONFIG_REGMAP_I2C_MODULE is set in the
pre-processor instead of CONFIG_REGMAP_I2C. This removes SND_SOC_I2C as a
valid option for snd_soc_codec_set_cache_io()'s control parameter, and
causes any ASoC regmap-using codec built as a module to fail to initialize.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 sound/soc/soc-io.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index be5aac3..22b6431 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -122,14 +122,14 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
 	config.val_bits = data_bits;
 
 	switch (control) {
-#ifdef CONFIG_REGMAP_I2C
+#if defined(CONFIG_REGMAP_I2C) || defined(CONFIG_REGMAP_I2C_MODULE)
 	case SND_SOC_I2C:
 		codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev),
 						      &config);
 		break;
 #endif
 
-#ifdef CONFIG_REGMAP_SPI
+#if defined(CONFIG_REGMAP_SPI) || defined(CONFIG_REGMAP_SPI_MODULE)
 	case SND_SOC_SPI:
 		codec->control_data = regmap_init_spi(to_spi_device(codec->dev),
 						      &config);
-- 
1.7.0.4

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

* Re: [PATCH 1/2] regmap: Specify a module license
  2011-08-11 17:59 [PATCH 1/2] regmap: Specify a module license Stephen Warren
  2011-08-11 17:59 ` [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules Stephen Warren
@ 2011-08-12  1:43 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-08-12  1:43 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, Liam Girdwood

On Thu, Aug 11, 2011 at 11:59:10AM -0600, Stephen Warren wrote:
> CONFIG_REGMAP_I2C/SPI are set to m when selected by a tristate config
> option that's set to m. The regmap modules don't specify a license, so
> fail to link to regmap_init at load time, since that is EXPORT_SYMBOL_GPL.
> Fix this by specifying a license for the regmap modules.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Applied, thanks.

Please do remember to send your patches to the right lists (this should
have gone to lkml, it's nothing to do with ASoC - or the following patch
really).

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

* Re: [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules
  2011-08-11 17:59 ` [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules Stephen Warren
@ 2011-08-12  2:55   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-08-12  2:55 UTC (permalink / raw)
  To: Stephen Warren; +Cc: alsa-devel, Liam Girdwood

On Thu, Aug 11, 2011 at 11:59:11AM -0600, Stephen Warren wrote:
> When CONFIG_REGMAP_I2C/SPI are m, CONFIG_REGMAP_I2C_MODULE is set in the
> pre-processor instead of CONFIG_REGMAP_I2C. This removes SND_SOC_I2C as a
> valid option for snd_soc_codec_set_cache_io()'s control parameter, and
> causes any ASoC regmap-using codec built as a module to fail to initialize.

Applied, thanks.

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

end of thread, other threads:[~2011-08-12  2:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 17:59 [PATCH 1/2] regmap: Specify a module license Stephen Warren
2011-08-11 17:59 ` [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules Stephen Warren
2011-08-12  2:55   ` Mark Brown
2011-08-12  1:43 ` [PATCH 1/2] regmap: Specify a module license Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox