ASoC: ti: fix SND_SOC_J721E_EVM warnings & errors
authorRandy Dunlap <rdunlap@infradead.org>
Mon, 20 Jul 2020 18:32:21 +0000 (11:32 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 23 Jul 2020 18:52:25 +0000 (19:52 +0100)
commit83249952ffab43b82487c1c497f1b49324c602d4
treeeca0a37c7e1bd69e56465ba2d77c03f026d781a1
parent3323a148fd79a6c6c8809bb793708bcfa626081d
ASoC: ti: fix SND_SOC_J721E_EVM warnings & errors

SND_SOC_J721E_EVM should not select SND_SOC_PCM3168A_I2C when I2C
is not enabled. That causes build errors, so make this driver's
symbol depend on I2C.

WARNING: unmet direct dependencies detected for SND_SOC_PCM3168A_I2C
  Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n]
  Selected by [m]:
  - SND_SOC_J721E_EVM [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (DMA_OMAP [=y] || TI_EDMA [=m] || TI_K3_UDMA [=n] || COMPILE_TEST [=y]) && (ARCH_K3_J721E_SOC [=n] || COMPILE_TEST [=y])

../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: data definition has no type or storage class
 module_i2c_driver(pcm3168a_i2c_driver);
 ^~~~~~~~~~~~~~~~~
../sound/soc/codecs/pcm3168a-i2c.c:59:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int]
../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: parameter names (without types) in function declaration
../sound/soc/codecs/pcm3168a-i2c.c:49:26: warning: ‘pcm3168a_i2c_driver’ defined but not used [-Wunused-variable]
 static struct i2c_driver pcm3168a_i2c_driver = {
                          ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/e74c690c-c7f8-fd42-e461-4f33571df4ef@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/Kconfig