diff mbox series

[v2,2/6] gpiolib: cdev: simplify parameter in call to hte_edge_setup

Message ID 20220714020319.72952-3-warthog618@gmail.com
State New
Headers show
Series gpiolib: cdev: code cleanup following hte integration | expand

Commit Message

Kent Gibson July 14, 2022, 2:03 a.m. UTC
Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead
of combining the rising and falling edge flags.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/gpio/gpiolib-cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Dipen Patel July 15, 2022, 5:10 a.m. UTC | #1
On 7/13/22 7:03 PM, Kent Gibson wrote:
> Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead
> of combining the rising and falling edge flags.
>
> Signed-off-by: Kent Gibson <warthog618@gmail.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
>  drivers/gpio/gpiolib-cdev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
> index b44526e3630e..f635bbbb6a6d 100644
> --- a/drivers/gpio/gpiolib-cdev.c
> +++ b/drivers/gpio/gpiolib-cdev.c
> @@ -885,9 +885,7 @@ static int debounce_setup(struct line *line,
>  				return ret;
>  			line->irq = irq;
>  		} else {
> -			ret = hte_edge_setup(line,
> -					     GPIO_V2_LINE_FLAG_EDGE_RISING |
> -					     GPIO_V2_LINE_FLAG_EDGE_FALLING);
> +			ret = hte_edge_setup(line, GPIO_V2_LINE_FLAG_EDGE_BOTH);
>  			if (ret)
>  				return ret;
>  		}

Acked-by: Dipen Patel <dipenp@nvidia.com>
Linus Walleij July 18, 2022, 9:29 a.m. UTC | #2
On Thu, Jul 14, 2022 at 4:04 AM Kent Gibson <warthog618@gmail.com> wrote:

> Improve readability by using the GPIO_V2_LINE_FLAG_EDGE_BOTH instead
> of combining the rising and falling edge flags.
>
> Signed-off-by: Kent Gibson <warthog618@gmail.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index b44526e3630e..f635bbbb6a6d 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -885,9 +885,7 @@  static int debounce_setup(struct line *line,
 				return ret;
 			line->irq = irq;
 		} else {
-			ret = hte_edge_setup(line,
-					     GPIO_V2_LINE_FLAG_EDGE_RISING |
-					     GPIO_V2_LINE_FLAG_EDGE_FALLING);
+			ret = hte_edge_setup(line, GPIO_V2_LINE_FLAG_EDGE_BOTH);
 			if (ret)
 				return ret;
 		}