summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-12-22 16:15:36 +0000
committerMark Brown <broonie@kernel.org>2017-12-22 16:15:36 +0000
commita885eebc1b062c6a6a925db85828108779fb0e62 (patch)
tree7b30939f9fd23dec2d4a06069bde06c8f9947c0d /drivers/spi
parent221886646f75964ca31cf60f1811b2c9c4e965a5 (diff)
downloadlinux-a885eebc1b062c6a6a925db85828108779fb0e62.tar.gz
linux-a885eebc1b062c6a6a925db85828108779fb0e62.tar.bz2
linux-a885eebc1b062c6a6a925db85828108779fb0e62.zip
spi: pxa2xx: Use gpiod_put() not gpiod_free()
gpiod_free() is an internal function for gpiolib, gpiod_put() is the correct external function. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-pxa2xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index c209dc1047b5..b0822d1dba29 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1237,7 +1237,7 @@ static int setup_cs(struct spi_device *spi, struct chip_data *chip,
* different chip_info, release previously requested GPIO
*/
if (chip->gpiod_cs) {
- gpiod_free(chip->gpiod_cs);
+ gpiod_put(chip->gpiod_cs);
chip->gpiod_cs = NULL;
}
@@ -1417,7 +1417,7 @@ static void cleanup(struct spi_device *spi)
if (drv_data->ssp_type != CE4100_SSP && !drv_data->cs_gpiods &&
chip->gpiod_cs)
- gpiod_free(chip->gpiod_cs);
+ gpiod_put(chip->gpiod_cs);
kfree(chip);
}