mbox series

[-next,0/2] ASoC: codecs: Fix build error

Message ID 20220511012348.94288-1-tanghui20@huawei.com
Headers show
Series ASoC: codecs: Fix build error | expand

Message

Hui Tang May 11, 2022, 1:23 a.m. UTC
Fix two build error, as follows:

tanghui (2):
  ASoC: max98396: Fix build error for implicit function declaration
  ASoC: tlv320adc3xxx: Fix build error for implicit function declaration

 sound/soc/codecs/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown May 11, 2022, 12:06 p.m. UTC | #1
On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:

>                          devm_regulator_get_optional
> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>               "reset", GPIOD_OUT_HIGH);
>                        ^~~~~~~~~~~~~~
>                        GPIOF_INIT_HIGH
> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>    ^~~~~~~~~~~~~~~~~~~~~~~~
>    gpio_set_value_cansleep
> cc1: all warnings being treated as errors
> 
> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'

No, these issues are missing headers not dependencies.  In general
gpiolib stubs out so drivers can optionally use GPIO functionality.
Hui Tang May 12, 2022, 4:46 a.m. UTC | #2
On 2022/5/11 20:06, Mark Brown wrote:
> On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:
>
>>                          devm_regulator_get_optional
>> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>>               "reset", GPIOD_OUT_HIGH);
>>                        ^~~~~~~~~~~~~~
>>                        GPIOF_INIT_HIGH
>> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>>    ^~~~~~~~~~~~~~~~~~~~~~~~
>>    gpio_set_value_cansleep
>> cc1: all warnings being treated as errors
>>
>> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'
>
> No, these issues are missing headers not dependencies.  In general
> gpiolib stubs out so drivers can optionally use GPIO functionality.
>

Ok, I will do that

thank you