]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: have a single place of calling set_config()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 24 Dec 2019 12:06:58 +0000 (13:06 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 7 Jan 2020 11:03:28 +0000 (12:03 +0100)
commita5ed00cf1ff66570307a9ed03e584920c7773187
tree6dee4ab64d6a5c014c71c00cddcb3df1d32cd9e5
parenta7c47ea29c036d29f9633e0d784b8951a832b58b
gpiolib: have a single place of calling set_config()

Instead of calling the gpiochip's set_config() callback directly and
checking its existence every time - just add a new routine that performs
this check internally. Call it in gpio_set_config() and
gpiod_set_transitory(). Also call it in gpiod_set_debounce() and drop
the check for chip->set() as it's irrelevant to this config option.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c