"With commit b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions")
it becomes necessary to pass the flags argument. And this patch add the gpio
header file to fix the build break when use random configuration file.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
---
 drivers/extcon/extcon-palmas.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 662e91778cb0..93c30a885740 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -29,6 +29,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/workqueue.h>
 
 #define USB_GPIO_DEBOUNCE_MS   20      /* ms */
@@ -208,7 +209,8 @@ static int palmas_usb_probe(struct platform_device *pdev)
                        palmas_usb->wakeup = pdata->wakeup;
        }
 
-       palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id");
+       palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id",
+                                                       GPIOD_IN);
        if (IS_ERR(palmas_usb->id_gpiod)) {
                dev_err(&pdev->dev, "failed to get id gpio\n");
                return PTR_ERR(palmas_usb->id_gpiod);
-- 
1.8.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to