Skip to content

Commit 86527bc

Browse files
andy-shevbroonie
authored andcommitted
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: 25093bd ("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>
1 parent 9ec2a73 commit 86527bc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/spi/spi.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
788788

789789
static void spi_set_cs(struct spi_device *spi, bool enable, bool force)
790790
{
791-
bool enable1 = enable;
791+
bool activate = enable;
792792

793793
/*
794794
* 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)
803803

804804
if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) ||
805805
!spi->controller->set_cs_timing) {
806-
if (enable1)
806+
if (activate)
807807
spi_delay_exec(&spi->controller->cs_setup, NULL);
808808
else
809809
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)
816816
if (!(spi->mode & SPI_NO_CS)) {
817817
if (spi->cs_gpiod)
818818
/* polarity handled by gpiolib */
819-
gpiod_set_value_cansleep(spi->cs_gpiod,
820-
enable1);
819+
gpiod_set_value_cansleep(spi->cs_gpiod, activate);
821820
else
822821
/*
823822
* 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)
835834

836835
if (spi->cs_gpiod || gpio_is_valid(spi->cs_gpio) ||
837836
!spi->controller->set_cs_timing) {
838-
if (!enable1)
837+
if (!activate)
839838
spi_delay_exec(&spi->controller->cs_inactive, NULL);
840839
}
841840
}

0 commit comments

Comments
 (0)