aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2015-08-12 20:19:43 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2015-08-13 07:56:18 -0400
commitac22a1d3386e195c57e299da3bfad97a061b9616 (patch)
tree5e2936091b0d5907ef494fad0d7bb25bd37a4653
parent92b7cb5dc885b38b21093eefed8028b615952965 (diff)
extcon: palmas: Fix build break due to devm_gpiod_get_optional API change
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 <sfr@canb.auug.org.au> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-rw-r--r--drivers/extcon/extcon-palmas.c4
1 files changed, 3 insertions, 1 deletions
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 @@
29#include <linux/of.h> 29#include <linux/of.h>
30#include <linux/of_platform.h> 30#include <linux/of_platform.h>
31#include <linux/of_gpio.h> 31#include <linux/of_gpio.h>
32#include <linux/gpio/consumer.h>
32#include <linux/workqueue.h> 33#include <linux/workqueue.h>
33 34
34#define USB_GPIO_DEBOUNCE_MS 20 /* ms */ 35#define USB_GPIO_DEBOUNCE_MS 20 /* ms */
@@ -208,7 +209,8 @@ static int palmas_usb_probe(struct platform_device *pdev)
208 palmas_usb->wakeup = pdata->wakeup; 209 palmas_usb->wakeup = pdata->wakeup;
209 } 210 }
210 211
211 palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id"); 212 palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id",
213 GPIOD_IN);
212 if (IS_ERR(palmas_usb->id_gpiod)) { 214 if (IS_ERR(palmas_usb->id_gpiod)) {
213 dev_err(&pdev->dev, "failed to get id gpio\n"); 215 dev_err(&pdev->dev, "failed to get id gpio\n");
214 return PTR_ERR(palmas_usb->id_gpiod); 216 return PTR_ERR(palmas_usb->id_gpiod);