Skip to content

Commit

Permalink
ASoC: wm89xx: Fix build errors caused by I2C dependency
Browse files Browse the repository at this point in the history
When I2C=m, SND_SOC_WM8900=y, SND_SOC_WM8988=y, SND_SOC_WM8995=y:

sound/soc/codecs/wm8900.o: In function `wm8900_i2c_probe':
wm8900.c:(.text+0xa16): undefined reference to `__devm_regmap_init_i2c'
sound/soc/codecs/wm8900.o: In function `wm8900_modinit':
wm8900.c:(.init.text+0xb): undefined reference to `i2c_register_driver'
sound/soc/codecs/wm8900.o: In function `wm8900_exit':
wm8900.c:(.exit.text+0x8): undefined reference to `i2c_del_driver'
sound/soc/codecs/wm8988.o: In function `wm8988_i2c_probe':
wm8988.c:(.text+0x86b): undefined reference to `__devm_regmap_init_i2c'
sound/soc/codecs/wm8988.o: In function `wm8988_modinit':
wm8988.c:(.init.text+0xb): undefined reference to `i2c_register_driver'
sound/soc/codecs/wm8988.o: In function `wm8988_exit':
wm8988.c:(.exit.text+0x8): undefined reference to `i2c_del_driver'
sound/soc/codecs/wm8995.o: In function `wm8995_i2c_probe':
wm8995.c:(.text+0x1b5b): undefined reference to `__devm_regmap_init_i2c'
sound/soc/codecs/wm8995.o: In function `wm8995_modinit':
wm8995.c:(.init.text+0xb): undefined reference to `i2c_register_driver'
sound/soc/codecs/wm8995.o: In function `wm8995_exit':
wm8995.c:(.exit.text+0x8): undefined reference to `i2c_del_driver'

As these drivers support I2C and SPI, we add the SND_SOC_I2C_AND_SPI
dependency to solve it.

Fixes: ea00d95 ("ASoC: Use imply for SND_SOC_ALL_CODECS")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wei Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
stkid authored and broonie committed Apr 20, 2020
1 parent bce3216 commit 91e475b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,7 @@ config SND_SOC_WM8804_SPI

config SND_SOC_WM8900
tristate
depends on SND_SOC_I2C_AND_SPI

config SND_SOC_WM8903
tristate "Wolfson Microelectronics WM8903 CODEC"
Expand Down Expand Up @@ -1576,6 +1577,7 @@ config SND_SOC_WM8985

config SND_SOC_WM8988
tristate
depends on SND_SOC_I2C_AND_SPI

config SND_SOC_WM8990
tristate
Expand All @@ -1594,6 +1596,7 @@ config SND_SOC_WM8994

config SND_SOC_WM8995
tristate
depends on SND_SOC_I2C_AND_SPI

config SND_SOC_WM8996
tristate
Expand Down

0 comments on commit 91e475b

Please sign in to comment.