Skip to contentSkip to conversation

ASoC: rt5645: fixed kbuild err

PATCH Applied [email protected] 2 participants 2 messages Apr 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt5645: fixed kbuild err

From: "Fang, Yang A" <[email protected]>

kbuild robot reports following error/warnings

sound/soc/codecs/rt5645.c: In function 'rt5645_i2c_probe':

Quoted 3 lines
Quoted 3 lines

sound/soc/codecs/rt5645.c:2720:4: error: implicit declaration of function 'devm_gpiod_get_index' [-Werror=implicit-function-declaration]

       gpiod = devm_gpiod_get_index(&i2c->dev, "rt5645", 0);
       ^
Quoted 2 lines
Quoted 2 lines

sound/soc/codecs/rt5645.c:2720:10: warning: assignment makes pointer from integer without a cast

       gpiod = devm_gpiod_get_index(&i2c->dev, "rt5645", 0);
             ^
Quoted 3 lines
Quoted 3 lines

sound/soc/codecs/rt5645.c:2722:4: error: implicit declaration of function 'gpiod_direction_input' [-Werror=implicit-function-declaration]

       if (IS_ERR(gpiod) || gpiod_direction_input(gpiod)) {
       ^
Quoted 2 lines
Quoted 2 lines

sound/soc/codecs/rt5645.c:2726:5: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]

        rt5645->pdata.hp_det_gpio = desc_to_gpio(gpiod);
        ^
Quoted 3 lines
Quoted 3 lines

sound/soc/codecs/rt5645.c:2728:7: error: implicit declaration of function 'gpiod_is_active_low' [-Werror=implicit-function-declaration]

          = !gpiod_is_active_low(gpiod);
          ^

cc1: some warnings being treated as errors

---
 sound/soc/codecs/rt5645.c |    1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt5645.c +1 -0
index fb561b4..2cab2eb 100644
@@ -18,6 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
 #include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/acpi.h>
 #include <linux/dmi.h>
 #include <sound/core.h>
Signature · 1 line
1.7.9.5