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
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);
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
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);
}
}