Skip to content

Commit

Permalink
spi: pxa2xx: Use gpiod_put() not gpiod_free()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Dec 22, 2017
1 parent 2218866 commit a885eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-pxa2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit a885eeb

Please sign in to comment.