Skip to contentSkip to conversation

input: soc_button_array: update calls to gpiod_get*()

PATCH Applied Alexandre Courbot 2 participants 2 messages Oct 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: soc_button_array: update calls to gpiod_get*()

Add the new flags argument to calls of (devm_)gpiod_get*().

Currently both forms (with or without the flags argument) are valid thanks to transitional macros in <linux/gpio/consumer.h>. These macros will be removed once all consumers are updated and the flags argument will become compulsary.

---
 drivers/input/misc/soc_button_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/soc_button_array.c +1 -1
index 735604753568..e097f1ab427f 100644
@@ -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);
+	desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 
Signature · 1 line
2.1.2
maintainer Applied
#1 lore raw
Quoted 9 lines · Alexandre Courbot

Add the new flags argument to calls of (devm_)gpiod_get*().

Currently both forms (with or without the flags argument) are valid thanks to transitional macros in <linux/gpio/consumer.h>. These macros will be removed once all consumers are updated and the flags argument will become compulsary.

Applied, thank you.

Quoted 20 lines
---
 drivers/input/misc/soc_button_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/soc_button_array.c +1 -1
index 735604753568..e097f1ab427f 100644
@@ -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);
+	desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 
Signature · 1 line
2.1.2
Signature · 1 line
Dmitry