Message ID | E1ZosbY-00048c-O2@finisterre (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 64c1aed..9136f30 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -606,7 +606,7 @@ static void spi_set_cs(struct spi_device *spi, bool enable) if (spi->mode & SPI_CS_HIGH) enable = !enable; - if (spi->cs_gpio >= 0) + if (gpio_is_valid(spi->cs_gpio)) gpio_set_value(spi->cs_gpio, !enable); else if (spi->master->set_cs) spi->master->set_cs(spi, !enable);