2014-10-23 08:18:07

by Alexandre Courbot

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Alexandre Courbot <[email protected]>
---
drivers/input/misc/soc_button_array.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 735604753568..e097f1ab427f 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);
+ desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
if (IS_ERR(desc))
return PTR_ERR(desc);

--
2.1.2


2014-10-23 15:54:04

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] input: soc_button_array: update calls to gpiod_get*()

On Thu, Oct 23, 2014 at 05:17:55PM +0900, Alexandre Courbot wrote:
> 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.
>
> Signed-off-by: Alexandre Courbot <[email protected]>

Applied, thank you.

> ---
> drivers/input/misc/soc_button_array.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
> index 735604753568..e097f1ab427f 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);
> + desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS);
> if (IS_ERR(desc))
> return PTR_ERR(desc);
>
> --
> 2.1.2
>

--
Dmitry