diff options
| author | Kent Gibson <[email protected]> | 2024-10-20 11:52:38 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2024-10-22 07:15:30 +0000 |
| commit | 9eb1e8276155b9f540281f2dbf59885efbb9f09f (patch) | |
| tree | f0268752bd66ef90477c50e770151d9194f99d0b /drivers/gpio/gpiolib-cdev.c | |
| parent | gpio: grgpio: remove remove() (diff) | |
| download | kernel-9eb1e8276155b9f540281f2dbf59885efbb9f09f.tar.gz kernel-9eb1e8276155b9f540281f2dbf59885efbb9f09f.zip | |
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]>
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.c')
| -rw-r--r-- | drivers/gpio/gpiolib-cdev.c | 4 |
1 files changed, 0 insertions, 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; |
