ASoC: wm89xx: Fix build errors caused by I2C dependency
authorWei Li <liwei391@huawei.com>
Mon, 20 Apr 2020 20:24:09 +0000 (04:24 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 20 Apr 2020 13:56:25 +0000 (14:56 +0100)
commit91e475b5e810c7e0d6346e58017507d66a23f526
tree64fad676e701beaa860e69b43c685b7efbb9bdb2
parentbce3216961d123111a8c60b7e5a1eeda6f56d6d4
ASoC: wm89xx: Fix build errors caused by I2C dependency

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: ea00d95200d02 ("ASoC: Use imply for SND_SOC_ALL_CODECS")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Li <liwei391@huawei.com>
Link: https://lore.kernel.org/r/20200420202410.47327-2-liwei391@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig