regmap: Specify a module license
Subsystems (4)
PATCH 1/2 regmap: Specify a module license
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.
--- drivers/base/regmap/regmap-i2c.c | 1 + drivers/base/regmap/regmap-spi.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/base/regmap/regmap-i2c.c +1 -0
@@ -112,3 +112,4 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, }EXPORT_SYMBOL_GPL (regmap_init_i2c); +MODULE_LICENSE ("GPL" );
drivers/base/regmap/regmap-spi.c +2 -0
@@ -69,3 +69,5 @@ struct regmap *regmap_init_spi(struct spi_device *spi,return regmap_init (&spi->dev, ®map_spi, config); }EXPORT_SYMBOL_GPL (regmap_init_spi); + +MODULE_LICENSE ("GPL" );
Signature · 1 line
1.7.0.4
PATCH 2/2 ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules
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.
--- sound/soc/soc-io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-io.c +2 -2
@@ -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);
Signature · 1 line
1.7.0.4
Mark Brown
AppliedRe: [PATCH 2/2] ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules
Quoted 4 lines · Stephen Warren
When CONFIG_REGMAP_I2C/SPI are m,
CONFIG_REGMAP_I2C_MODULEis set in the pre-processor instead ofCONFIG_REGMAP_I2C. This removesSND_SOC_I2Cas 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.
Mark Brown
AppliedQuoted 6 lines · 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_initat load time, since that isEXPORT_SYMBOL_GPL. Fix this by specifying a license for the regmap modules.Signed-off-by Stephen Warren <[email protected]>
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).