Skip to contentSkip to conversation

ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER

PATCH In review Axel Lin 3 participants 4 messages Aug 31, 2015

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER

(devm_)reset_control_get function is available only when RESET_CONTROLLER is set. Make SND_SOC_STI_SAS depend on RESET_CONTROLLER to fix build error if !RESET_CONTROLLER.

---
 sound/soc/codecs/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/Kconfig +2 -1
index 0c9733e..f8e0022 100644
@@ -106,7 +106,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_STA350 if I2C
 	select SND_SOC_STA529 if I2C
 	select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
-	select SND_SOC_STI_SAS
+	select SND_SOC_STI_SAS if RESET_CONTROLLER
 	select SND_SOC_TAS2552 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
@@ -634,6 +634,7 @@ config SND_SOC_STAC9766
 
 config SND_SOC_STI_SAS
 	tristate "codec Audio support for STI SAS codec"
+	depends on RESET_CONTROLLER
 
 config SND_SOC_TAS2552
 	tristate "Texas Instruments TAS2552 Mono Audio amplifier"
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Axel Lin

(devm_)reset_control_get function is available only when RESET_CONTROLLER is set. Make SND_SOC_STI_SAS depend on RESET_CONTROLLER to fix build error if !RESET_CONTROLLER.

Thanks, this fixes, but it'd be better to have a proper dummy function for devm_reset_control_get() with CONFIG_RESET_CONTROLLER=n, IMO.

Takashi

Quoted 31 lines
---
 sound/soc/codecs/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/Kconfig +2 -1
index 0c9733e..f8e0022 100644
@@ -106,7 +106,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_STA350 if I2C
 	select SND_SOC_STA529 if I2C
 	select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
-	select SND_SOC_STI_SAS
+	select SND_SOC_STI_SAS if RESET_CONTROLLER
 	select SND_SOC_TAS2552 if I2C
 	select SND_SOC_TAS5086 if I2C
 	select SND_SOC_TAS571X if I2C
@@ -634,6 +634,7 @@ config SND_SOC_STAC9766
 
 config SND_SOC_STI_SAS
 	tristate "codec Audio support for STI SAS codec"
+	depends on RESET_CONTROLLER
 
 config SND_SOC_TAS2552
 	tristate "Texas Instruments TAS2552 Mono Audio amplifier"
Signature · 1 line
1.9.1
author
#2 lore raw

2015-08-31 17:10 GMT+08:00 Takashi Iwai <[email protected]>:

Quoted 7 lines
Quoted 5 lines · Axel Lin

(devm_)reset_control_get function is available only when RESET_CONTROLLER is set. Make SND_SOC_STI_SAS depend on RESET_CONTROLLER to fix build error if !RESET_CONTROLLER.

Quoted 5 lines
Quoted 2 lines

Thanks, this fixes, but it'd be better to have a proper dummy function for devm_reset_control_get() with CONFIG_RESET_CONTROLLER=n, IMO.

You are right.
Not sure if anyone already sent the fix, I'm sending it.

maintainer
#3 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

(devm_)reset_control_get function is available only when RESET_CONTROLLER is set. Make SND_SOC_STI_SAS depend on RESET_CONTROLLER to fix build error if !RESET_CONTROLLER.

Ugh, no. This is not good - the reset controller API should be stubbing itself out like other service APIs so that generic code can work with it without lots of ifdefs. It's a similar situation to regulators and GPIOs.