From 802f059575e7bfdfad50e30c5ec7d8c0530f1b79 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 13 Aug 2015 09:19:43 +0900 Subject: [PATCH] extcon: palmas: Fix build break due to devm_gpiod_get_optional API change MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With commit b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions") it becomes necessary to pass the flags argument. And this patch adds the gpio header file to fix the build breakage when build testing with random configuration files. Reported-by: Stephen Rothwell Signed-off-by: Chanwoo Choi Acked-by: Uwe Kleine-König --- 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 662e91778cb0e..93c30a885740e 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #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); -- 2.39.5