[PATCH v2 1/2] ASoC: cs35l45: Remove separate tables module

There is no reason to have a separate module for the tables file it just holds regmap callbacks and register patches used by the main part of the driver. Remove the separate module and merge it into the main driver module.
Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com ---
Changes since v1: - Remove module macros as the bottom of cs35l45-tables.c
sound/soc/codecs/Kconfig | 5 ----- sound/soc/codecs/Makefile | 4 +--- sound/soc/codecs/cs35l45-tables.c | 4 ---- 3 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 4621674e68bf1..bd72c426a93d1 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -688,9 +688,6 @@ config SND_SOC_CS35L41_I2C select SND_SOC_CS35L41 select REGMAP_I2C
-config SND_SOC_CS35L45_TABLES - tristate - config SND_SOC_CS35L45 tristate
@@ -699,7 +696,6 @@ config SND_SOC_CS35L45_SPI depends on SPI_MASTER select REGMAP select REGMAP_SPI - select SND_SOC_CS35L45_TABLES select SND_SOC_CS35L45 help Enable support for Cirrus Logic CS35L45 smart speaker amplifier @@ -710,7 +706,6 @@ config SND_SOC_CS35L45_I2C depends on I2C select REGMAP select REGMAP_I2C - select SND_SOC_CS35L45_TABLES select SND_SOC_CS35L45 help Enable support for Cirrus Logic CS35L45 smart speaker amplifier diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index a0a61554548eb..f1ca18f7946ca 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -63,8 +63,7 @@ snd-soc-cs35l41-lib-objs := cs35l41-lib.o snd-soc-cs35l41-objs := cs35l41.o snd-soc-cs35l41-spi-objs := cs35l41-spi.o snd-soc-cs35l41-i2c-objs := cs35l41-i2c.o -snd-soc-cs35l45-tables-objs := cs35l45-tables.o -snd-soc-cs35l45-objs := cs35l45.o +snd-soc-cs35l45-objs := cs35l45.o cs35l45-tables.o snd-soc-cs35l45-spi-objs := cs35l45-spi.o snd-soc-cs35l45-i2c-objs := cs35l45-i2c.o snd-soc-cs42l42-objs := cs42l42.o @@ -431,7 +430,6 @@ obj-$(CONFIG_SND_SOC_CS35L41) += snd-soc-cs35l41.o obj-$(CONFIG_SND_SOC_CS35L41_LIB) += snd-soc-cs35l41-lib.o obj-$(CONFIG_SND_SOC_CS35L41_SPI) += snd-soc-cs35l41-spi.o obj-$(CONFIG_SND_SOC_CS35L41_I2C) += snd-soc-cs35l41-i2c.o -obj-$(CONFIG_SND_SOC_CS35L45_TABLES) += snd-soc-cs35l45-tables.o obj-$(CONFIG_SND_SOC_CS35L45) += snd-soc-cs35l45.o obj-$(CONFIG_SND_SOC_CS35L45_SPI) += snd-soc-cs35l45-spi.o obj-$(CONFIG_SND_SOC_CS35L45_I2C) += snd-soc-cs35l45-i2c.o diff --git a/sound/soc/codecs/cs35l45-tables.c b/sound/soc/codecs/cs35l45-tables.c index 5a2c2e684ef9f..5a2f47ca57716 100644 --- a/sound/soc/codecs/cs35l45-tables.c +++ b/sound/soc/codecs/cs35l45-tables.c @@ -196,7 +196,3 @@ unsigned int cs35l45_get_clk_freq_id(unsigned int freq) return -EINVAL; } EXPORT_SYMBOL_NS_GPL(cs35l45_get_clk_freq_id, SND_SOC_CS35L45_TABLES); - -MODULE_DESCRIPTION("ASoC CS35L45 driver tables"); -MODULE_AUTHOR("James Schulman, Cirrus Logic Inc, james.schulman@cirrus.com"); -MODULE_LICENSE("Dual BSD/GPL");

Now tables isn't a separate module, definitely no need to have a separate namespace for it.
Signed-off-by: Charles Keepax ckeepax@opensource.cirrus.com --- sound/soc/codecs/cs35l45-i2c.c | 1 - sound/soc/codecs/cs35l45-spi.c | 1 - sound/soc/codecs/cs35l45-tables.c | 8 ++++---- sound/soc/codecs/cs35l45.c | 1 - 4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/cs35l45-i2c.c b/sound/soc/codecs/cs35l45-i2c.c index 39d28641429e4..1117df4b2f118 100644 --- a/sound/soc/codecs/cs35l45-i2c.c +++ b/sound/soc/codecs/cs35l45-i2c.c @@ -71,4 +71,3 @@ MODULE_DESCRIPTION("I2C CS35L45 driver"); MODULE_AUTHOR("James Schulman, Cirrus Logic Inc, james.schulman@cirrus.com"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SND_SOC_CS35L45); -MODULE_IMPORT_NS(SND_SOC_CS35L45_TABLES); diff --git a/sound/soc/codecs/cs35l45-spi.c b/sound/soc/codecs/cs35l45-spi.c index baaf6e0f4fb9d..ffaca07fb2679 100644 --- a/sound/soc/codecs/cs35l45-spi.c +++ b/sound/soc/codecs/cs35l45-spi.c @@ -71,4 +71,3 @@ MODULE_DESCRIPTION("SPI CS35L45 driver"); MODULE_AUTHOR("James Schulman, Cirrus Logic Inc, james.schulman@cirrus.com"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SND_SOC_CS35L45); -MODULE_IMPORT_NS(SND_SOC_CS35L45_TABLES); diff --git a/sound/soc/codecs/cs35l45-tables.c b/sound/soc/codecs/cs35l45-tables.c index 5a2f47ca57716..4b1320a2e6e97 100644 --- a/sound/soc/codecs/cs35l45-tables.c +++ b/sound/soc/codecs/cs35l45-tables.c @@ -38,7 +38,7 @@ int cs35l45_apply_patch(struct cs35l45_private *cs35l45) return regmap_register_patch(cs35l45->regmap, cs35l45_patch, ARRAY_SIZE(cs35l45_patch)); } -EXPORT_SYMBOL_NS_GPL(cs35l45_apply_patch, SND_SOC_CS35L45_TABLES); +EXPORT_SYMBOL_NS_GPL(cs35l45_apply_patch, SND_SOC_CS35L45);
static const struct reg_default cs35l45_defaults[] = { { CS35L45_BLOCK_ENABLES, 0x00003323 }, @@ -126,7 +126,7 @@ const struct regmap_config cs35l45_i2c_regmap = { .readable_reg = cs35l45_readable_reg, .cache_type = REGCACHE_RBTREE, }; -EXPORT_SYMBOL_NS_GPL(cs35l45_i2c_regmap, SND_SOC_CS35L45_TABLES); +EXPORT_SYMBOL_NS_GPL(cs35l45_i2c_regmap, SND_SOC_CS35L45);
const struct regmap_config cs35l45_spi_regmap = { .reg_bits = 32, @@ -142,7 +142,7 @@ const struct regmap_config cs35l45_spi_regmap = { .readable_reg = cs35l45_readable_reg, .cache_type = REGCACHE_RBTREE, }; -EXPORT_SYMBOL_NS_GPL(cs35l45_spi_regmap, SND_SOC_CS35L45_TABLES); +EXPORT_SYMBOL_NS_GPL(cs35l45_spi_regmap, SND_SOC_CS35L45);
static const struct { u8 cfg_id; @@ -195,4 +195,4 @@ unsigned int cs35l45_get_clk_freq_id(unsigned int freq)
return -EINVAL; } -EXPORT_SYMBOL_NS_GPL(cs35l45_get_clk_freq_id, SND_SOC_CS35L45_TABLES); +EXPORT_SYMBOL_NS_GPL(cs35l45_get_clk_freq_id, SND_SOC_CS35L45); diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c index d15b3b77c7eb0..855d9f13e6ff1 100644 --- a/sound/soc/codecs/cs35l45.c +++ b/sound/soc/codecs/cs35l45.c @@ -687,4 +687,3 @@ MODULE_DESCRIPTION("ASoC CS35L45 driver"); MODULE_AUTHOR("James Schulman, Cirrus Logic Inc, james.schulman@cirrus.com"); MODULE_AUTHOR("Richard Fitzgerald rf@opensource.cirrus.com"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_IMPORT_NS(SND_SOC_CS35L45_TABLES);

On Wed, 15 Feb 2023 10:58:17 +0000, Charles Keepax wrote:
There is no reason to have a separate module for the tables file it just holds regmap callbacks and register patches used by the main part of the driver. Remove the separate module and merge it into the main driver module.
Applied to
broonie/sound.git for-next
Thanks!
[1/2] ASoC: cs35l45: Remove separate tables module commit: 4dac6f5abc02ffeeb10459c575aba2343363d4ee [2/2] ASoC: cs35l45: Remove separate namespace for tables commit: 926505cf14258376c3cd244e891c7d739a2a049a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (2)
-
Charles Keepax
-
Mark Brown