Skip to contentSkip to conversation

ASoC: adav80x: Select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI

PATCH Applied Axel Lin 3 participants 3 messages Jun 10, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: adav80x: Select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI

This driver is useless if both SPI and I2C are not configured. Thus don't build this driver if both SPI and I2C are not configured.

This patch silences below build warning if both SPI and I2C are not configured.

CC sound/soc/codecs/adav80x.o
sound/soc/codecs/adav80x.c:842:12: warning: 'adav80x_bus_probe' defined but not used [-Wunused-function] sound/soc/codecs/adav80x.c:863:12: warning: 'adav80x_bus_remove' defined but not used [-Wunused-function]

---
 sound/soc/codecs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/Kconfig +1 -1
index c90d298..6234900 100644
@@ -19,7 +19,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
 	select SND_SOC_AD73311
 	select SND_SOC_ADAU1373 if I2C
-	select SND_SOC_ADAV80X
+	select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI
 	select SND_SOC_ADS117X
 	select SND_SOC_AK4104 if SPI_MASTER
 	select SND_SOC_AK4535 if I2C
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Axel Lin

This driver is useless if both SPI and I2C are not configured. Thus don't build this driver if both SPI and I2C are not configured.

This patch silences below build warning if both SPI and I2C are not configured.

CC sound/soc/codecs/adav80x.o
sound/soc/codecs/adav80x.c:842:12: warning: 'adav80x_bus_probe' defined but not used [-Wunused-function] sound/soc/codecs/adav80x.c:863:12: warning: 'adav80x_bus_remove' defined but not used [-Wunused-function]

Yep, wanted to send the same patch sometime in the next days, since this actually also fixes a compile error in case of I2C=m and SPI=y.

Quoted 17 lines
---
 sound/soc/codecs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/Kconfig +1 -1
index c90d298..6234900 100644
@@ -19,7 +19,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
 	select SND_SOC_AD73311
 	select SND_SOC_ADAU1373 if I2C
-	select SND_SOC_ADAV80X
+	select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI
 	select SND_SOC_ADS117X
 	select SND_SOC_AK4104 if SPI_MASTER
 	select SND_SOC_AK4535 if I2C
maintainer Applied
#2 lore raw
Quoted 2 lines · Lars-Peter Clausen

Yep, wanted to send the same patch sometime in the next days, since this actually also fixes a compile error in case of I2C=m and SPI=y.

Applied, thanks.