aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 3abb3903f2ad..bf989f6a80e0 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1610,8 +1610,7 @@ static struct class spi_master_class = {
1610 * 1610 *
1611 * The caller is responsible for assigning the bus number and initializing 1611 * The caller is responsible for assigning the bus number and initializing
1612 * the master's methods before calling spi_register_master(); and (after errors 1612 * the master's methods before calling spi_register_master(); and (after errors
1613 * adding the device) calling spi_master_put() and kfree() to prevent a memory 1613 * adding the device) calling spi_master_put() to prevent a memory leak.
1614 * leak.
1615 */ 1614 */
1616struct spi_master *spi_alloc_master(struct device *dev, unsigned size) 1615struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
1617{ 1616{
@@ -1993,11 +1992,11 @@ int spi_setup(struct spi_device *spi)
1993 if (!spi->max_speed_hz) 1992 if (!spi->max_speed_hz)
1994 spi->max_speed_hz = spi->master->max_speed_hz; 1993 spi->max_speed_hz = spi->master->max_speed_hz;
1995 1994
1996 spi_set_cs(spi, false);
1997
1998 if (spi->master->setup) 1995 if (spi->master->setup)
1999 status = spi->master->setup(spi); 1996 status = spi->master->setup(spi);
2000 1997
1998 spi_set_cs(spi, false);
1999
2001 dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s%u bits/w, %u Hz max --> %d\n", 2000 dev_dbg(&spi->dev, "setup mode %d, %s%s%s%s%u bits/w, %u Hz max --> %d\n",
2002 (int) (spi->mode & (SPI_CPOL | SPI_CPHA)), 2001 (int) (spi->mode & (SPI_CPOL | SPI_CPHA)),
2003 (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "", 2002 (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",