From: Lu Baolu Date: Mon, 25 Apr 2016 23:35:54 +0000 (+0900) Subject: extcon: usb-gpio: add support for ACPI gpio interface X-Git-Tag: v4.8-rc1~194^2~5^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=942c7924a51e;p=karo-tx-linux.git extcon: usb-gpio: add support for ACPI gpio interface GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 8969606e629b..2512660dc4b9 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -27,6 +27,7 @@ #include #include #include +#include #define USB_GPIO_DEBOUNCE_MS 20 /* ms */ @@ -92,7 +93,7 @@ static int usb_extcon_probe(struct platform_device *pdev) struct usb_extcon_info *info; int ret; - if (!np) + if (!np && !ACPI_HANDLE(dev)) return -EINVAL; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);