diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-04-20 16:18:46 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-04-23 17:36:18 +0300 |
commit | 86527bcbc88922ea40df05d28189ee15489d2cf1 (patch) | |
tree | c52f196a8db5a5d7d457e9e976b7dd4e4aaf4862 /drivers/spi/spi.c | |
parent | 9ec2a73f0b09f5a5070a0092f08b1531b2cb0d8d (diff) | |
download | linux-86527bcbc88922ea40df05d28189ee15489d2cf1.tar.xz |
spi: Rename enable1 to activate in spi_set_cs()
The enable1 is confusing name. Change it to clearly show what is
the intention behind it. No functional changes.
Fixes: 25093bdeb6bc ("spi: implement SW control for CS times")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210420131846.75983-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 06db13169231..ba425b9c7700 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -788,7 +788,7 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n) static void spi_set_cs(struct spi_device *spi, bool enable, bool force) { - bool enable1 = enable; + bool activate = enable; /* * Avoid calling into the driver (or doing delays) if the chip select @@ -803,7 +803,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force) if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) || !spi->controller->set_cs_timing) { - if (enable1) + if (activate) spi_delay_exec(&spi->controller->cs_setup, NULL); else spi_delay_exec(&spi->controller->cs_hold, NULL); @@ -816,8 +816,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force) if (!(spi->mode & SPI_NO_CS)) { if (spi->cs_gpiod) /* polarity handled by gpiolib */ - gpiod_set_value_cansleep(spi->cs_gpiod, - enable1); + gpiod_set_value_cansleep(spi->cs_gpiod, activate); else /* * invert the enable line, as active low is @@ -835,7 +834,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force) if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) || !spi->controller->set_cs_timing) { - if (!enable1) + if (!activate) spi_delay_exec(&spi->controller->cs_inactive, NULL); } } |