Skip to contentSkip to conversation

gpiolib: cdev: remove redundant store of debounce_period_us

PATCH Applied Kent Gibson 2 participants 2 messages Oct 20, 2024 – Oct 22, 2024

Subsystems (2)
lore
Share & tools
lore

Kent Gibson

author reviewer
#0 lore raw

PATCH 1/1 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().

---

Based on gpio/for-next with v5 of your recent notify series.

 drivers/gpio/gpiolib-cdev.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpio/gpiolib-cdev.c +0 -4
index 13d83675bf4f..0ec162b0ea04 100644
@@ -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

Signature · 1 line
2.39.5
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 9 lines · Kent Gibson

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().

[...]

Applied, thanks!

[1/1] gpiolib: cdev: remove redundant store of debounce_period_us

      commit: 9eb1e8276155b9f540281f2dbf59885efbb9f09f

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>