[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241020115238.170994-1-warthog618@gmail.com>
Date: Sun, 20 Oct 2024 19:52:38 +0800
From: Kent Gibson <warthog618@...il.com>
To: linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org,
brgl@...ev.pl,
linus.walleij@...aro.org
Cc: Kent Gibson <warthog618@...il.com>
Subject: [PATCH] gpiolib: cdev: remove redundant store of debounce_period_us
debounce_setup() stores the debounce_period_us if the driver supports
debounce, but the debounce_period_us is also stored where debounce_setup()
is called, independent of whether the debounce is being perfomed by
hardware or software.
Remove the redundant storing of the debounce_period_us in
debounce_setup().
Signed-off-by: Kent Gibson <warthog618@...il.com>
---
Based on gpio/for-next with v5 of your recent notify series.
drivers/gpio/gpiolib-cdev.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 13d83675bf4f..0ec162b0ea04 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -929,10 +929,6 @@ static int debounce_setup(struct line *line, unsigned int debounce_period_us)
ret = gpio_do_set_config(line->desc,
pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE,
debounce_period_us));
- if (!ret) {
- WRITE_ONCE(line->desc->debounce_period_us, debounce_period_us);
- return ret;
- }
if (ret != -ENOTSUPP)
return ret;
base-commit: 94fe8eced6e1448378bb368c9f14c9af510670d4
--
2.39.5
Powered by blists - more mailing lists