mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
extcon: palmas: Fix build break due to devm_gpiod_get_optional API change
With commit b17d1bf16c ("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 <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
This commit is contained in:
parent
92b7cb5dc8
commit
ac22a1d338
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue