summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2019-02-07 17:28:57 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-02-13 09:09:06 +0100
commit6581eaf0e890756e093e2f44916edb5e7e6558ca (patch)
treeccd188292542cea22a25e85675ae272eaee8e219
parent71479789851bdd9d56cd9e82892b0a3bee0a4c2a (diff)
downloadlinux-stable-6581eaf0e890756e093e2f44916edb5e7e6558ca.tar.gz
linux-stable-6581eaf0e890756e093e2f44916edb5e7e6558ca.tar.bz2
linux-stable-6581eaf0e890756e093e2f44916edb5e7e6558ca.zip
gpio: use new gpio_set_config() helper in more places
As suggested by Linus Walleij, let's use the new gpio_set_config() helper in gpiod_set_debounce() and gpiod_set_transitory(). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpiolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index de595fa31a1a..1f239aac43df 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2725,7 +2725,7 @@ int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce)
}
config = pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE, debounce);
- return chip->set_config(chip, gpio_chip_hwgpio(desc), config);
+ return gpio_set_config(chip, gpio_chip_hwgpio(desc), config);
}
EXPORT_SYMBOL_GPL(gpiod_set_debounce);
@@ -2762,7 +2762,7 @@ int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)
packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE,
!transitory);
gpio = gpio_chip_hwgpio(desc);
- rc = chip->set_config(chip, gpio, packed);
+ rc = gpio_set_config(chip, gpio, packed);
if (rc == -ENOTSUPP) {
dev_dbg(&desc->gdev->dev, "Persistence not supported for GPIO %d\n",
gpio);