All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER
@ 2015-08-31  0:52 Axel Lin
  2015-08-31  8:59 ` Mark Brown
  2015-08-31  9:10 ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2015-08-31  0:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Arnaud Pouliquen, Takashi Iwai, Liam Girdwood

(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.

Reported-by: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 0c9733e..f8e0022 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -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"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER
  2015-08-31  0:52 [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER Axel Lin
@ 2015-08-31  8:59 ` Mark Brown
  2015-08-31  9:10 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-08-31  8:59 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Arnaud Pouliquen, Takashi Iwai, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 457 bytes --]

On Mon, Aug 31, 2015 at 08:52:33AM +0800, Axel Lin wrote:
> (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.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER
  2015-08-31  0:52 [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER Axel Lin
  2015-08-31  8:59 ` Mark Brown
@ 2015-08-31  9:10 ` Takashi Iwai
  2015-08-31  9:22   ` Axel Lin
  1 sibling, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2015-08-31  9:10 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Arnaud Pouliquen, Liam Girdwood

On Mon, 31 Aug 2015 02:52:33 +0200,
Axel Lin wrote:
> 
> (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.
> 
> Reported-by: Takashi Iwai <tiwai@suse.com>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

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


> ---
>  sound/soc/codecs/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 0c9733e..f8e0022 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -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"
> -- 
> 1.9.1
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER
  2015-08-31  9:10 ` Takashi Iwai
@ 2015-08-31  9:22   ` Axel Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2015-08-31  9:22 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel@alsa-project.org, Mark Brown, Arnaud Pouliquen,
	Liam Girdwood

2015-08-31 17:10 GMT+08:00 Takashi Iwai <tiwai@suse.de>:
> On Mon, 31 Aug 2015 02:52:33 +0200,
> Axel Lin wrote:
>>
>> (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.
>>
>> Reported-by: Takashi Iwai <tiwai@suse.com>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-31 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31  0:52 [PATCH] ASoC: Make SND_SOC_STI_SAS depend on RESET_CONTROLLER Axel Lin
2015-08-31  8:59 ` Mark Brown
2015-08-31  9:10 ` Takashi Iwai
2015-08-31  9:22   ` Axel Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.