linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: tlv320adc3xxx: Fix build error when GPIOLIB is not set
@ 2022-03-23 14:17 Baisong Zhong
  2022-03-23 16:21 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Baisong Zhong @ 2022-03-23 14:17 UTC (permalink / raw)
  To: linux-kernel, alsa-devel
  Cc: lgirdwood, broonie, perex, tiwai, srinivas.kandagatla, ckeepax,
	tanureal, cy_huang, pierre-louis.bossart, drhodes, pbrobinson,
	hdegoede, lukas.bulwahn, ricardw

sound/soc/codecs/tlv320adc3xxx.c:1352:21: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’?
sound/soc/codecs/tlv320adc3xxx.c:1352:50: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
sound/soc/codecs/tlv320adc3xxx.c:1400:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’?

Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baisong Zhong <zhongbaisong@huawei.com>
---
 sound/soc/codecs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f46a22660103..1400fc75fd65 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1535,7 +1535,7 @@ config SND_SOC_TFA989X
 
 config SND_SOC_TLV320ADC3XXX
 	tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
-	depends on I2C
+	depends on I2C && GPIOLIB
 	help
 	 Enable support for Texas Instruments TLV320ADC3001 and TLV320ADC3101
 	 ADCs.
-- 
2.25.1


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

* Re: [PATCH -next] ASoC: tlv320adc3xxx: Fix build error when GPIOLIB is not set
  2022-03-23 14:17 [PATCH -next] ASoC: tlv320adc3xxx: Fix build error when GPIOLIB is not set Baisong Zhong
@ 2022-03-23 16:21 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-03-23 16:21 UTC (permalink / raw)
  To: Baisong Zhong
  Cc: linux-kernel, alsa-devel, lgirdwood, perex, tiwai,
	srinivas.kandagatla, ckeepax, tanureal, cy_huang,
	pierre-louis.bossart, drhodes, pbrobinson, hdegoede,
	lukas.bulwahn, ricardw

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Wed, Mar 23, 2022 at 10:17:36PM +0800, Baisong Zhong wrote:

>  config SND_SOC_TLV320ADC3XXX
>  	tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
> -	depends on I2C
> +	depends on I2C && GPIOLIB

This is bogus, the device clearly doesn't require GPIOs to be useful and
so there shouldn't be a dependency on gpiolib which normally stubs out.
In general for APIs with stubs adding a config dependency is not the right
thing to do.

I suspect it's just a missing header.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2022-03-23 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 14:17 [PATCH -next] ASoC: tlv320adc3xxx: Fix build error when GPIOLIB is not set Baisong Zhong
2022-03-23 16:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).