gpiolib: cdev: simplify parameter in call to hte_edge_setup
authorKent Gibson <warthog618@gmail.com>
Thu, 14 Jul 2022 02:03:15 +0000 (10:03 +0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 08:01:25 +0000 (10:01 +0200)
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>
Acked-by: Dipen Patel <dipenp@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib-cdev.c

index b44526e..f635bbb 100644 (file)
@@ -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;
                }