Skip to content

Commit 9eb1e82

Browse files
warthog618Bartosz Golaszewski
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 3aba840 commit 9eb1e82

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/gpio/gpiolib-cdev.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,10 +929,6 @@ static int debounce_setup(struct line *line, unsigned int debounce_period_us)
929929
ret = gpio_do_set_config(line->desc,
930930
pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE,
931931
debounce_period_us));
932-
if (!ret) {
933-
WRITE_ONCE(line->desc->debounce_period_us, debounce_period_us);
934-
return ret;
935-
}
936932
if (ret != -ENOTSUPP)
937933
return ret;
938934

0 commit comments

Comments
 (0)