diff options
author | Anders Roxell | 2019-01-14 10:55:40 +0100 |
---|---|---|
committer | Mark Brown | 2019-01-14 22:13:51 +0000 |
commit | 3e8c45f57a90585cfc0b07ae81de8960a8366c1c (patch) | |
tree | 2a69f316280275f466d08b9589e7ed6941ad8179 /sound/soc/codecs/Kconfig | |
parent | f833fe2056b3a6d69598ef029cede6e77dcc1b14 (diff) |
ASoC: cs4341: fix waring unused-function
The driver cs4341 can be built with SPI and/or I2C, but it has to be one
of them at least. When I2C is set as a module we see the warning below:
sound/soc/codecs/cs4341.c:213:12: warning: ‘cs4341_probe’
defined but not used [-Wunused-function]
static int cs4341_probe(struct device *dev)
^~~~~~~~~~~~
Rework so that we use IS_ENABLED instead of defined. Also change so
SND_SOC_CS4341 depends on SND_SOC_I2C_AND_SPI to we dont' get a link
error when SND_SOC_CS4341=y, I2C=m and REGMAP_I2C=m is set.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/Kconfig')
-rw-r--r-- | sound/soc/codecs/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 87cb9c51e6f5..87ecb38e57f4 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -546,7 +546,7 @@ config SND_SOC_CS43130 config SND_SOC_CS4341 tristate "Cirrus Logic CS4341 CODEC" - depends on I2C || SPI_MASTER + depends on SND_SOC_I2C_AND_SPI select REGMAP_I2C if I2C select REGMAP_SPI if SPI_MASTER |