gpiolib: cdev: simplify linereq_free
authorKent Gibson <warthog618@gmail.com>
Thu, 14 Jul 2022 02:03:14 +0000 (10:03 +0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 08:01:22 +0000 (10:01 +0200)
commit160d6e402900672d4b0689a7c939be487460a1fe
tree4a7db25682f4a4c4d290b0c086cad446a9d666eb
parent3e2d53b2734bea05dba4f8fa94332ad6dd343712
gpiolib: cdev: simplify linereq_free

The edge detector is only ever started after the line desc has been
determined, so move edge_detector_stop() inside the line desc check,
and merge the two checked regions into one.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-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