]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs4341: fix waring unused-function
authorAnders Roxell <anders.roxell@linaro.org>
Mon, 14 Jan 2019 09:55:40 +0000 (10:55 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 14 Jan 2019 22:13:51 +0000 (22:13 +0000)
commitcc3beebc6b0454de96b2d384d7baf9d2660edb06
tree2a69f316280275f466d08b9589e7ed6941ad8179
parentba922ae97f3bb612d9d8eb39d879f3f99712ef09
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>
sound/soc/codecs/Kconfig
sound/soc/codecs/cs4341.c