From: Hans de Goede Date: Thu, 9 Mar 2017 17:58:30 +0000 (-0800) Subject: Input: soc_button_array - use NULL for GPIO connection ID X-Git-Tag: v4.12-rc1~1^2~5^2~124 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a01cd17000a4eb35060666f181f1d46832b59030;p=linux-2.6-block.git Input: soc_button_array - use NULL for GPIO connection ID The gpiolib-acpi code is becoming more strict and connection-IDs may only be used with devices which have a _DSD with matching IDs in there. Since the soc_button_array ACPI binding is pure index based pass in NULL as connection-ID to avoid the more strict cheks resulting in gpiod_count and gpiod_get_index not returning any gpios. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index ddb2f22fca7a..0cd2cac47660 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -55,7 +55,7 @@ static int soc_button_lookup_gpio(struct device *dev, int acpi_index) struct gpio_desc *desc; int gpio; - desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS); + desc = gpiod_get_index(dev, NULL, acpi_index, GPIOD_ASIS); if (IS_ERR(desc)) return PTR_ERR(desc); @@ -169,7 +169,7 @@ static int soc_button_probe(struct platform_device *pdev) button_info = (struct soc_button_info *)id->driver_data; - if (gpiod_count(dev, KBUILD_MODNAME) <= 0) { + if (gpiod_count(dev, NULL) <= 0) { dev_dbg(dev, "no GPIO attached, ignoring...\n"); return -ENODEV; }