Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7715aad4 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

spi/bfin_spi: reject unsupported SPI modes



Who knows what people will try!

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent a75bd65b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1022,6 +1022,10 @@ static int bfin_spi_setup(struct spi_device *spi)
	}

	/* translate common spi framework into our register */
	if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) {
		dev_err(&spi->dev, "unsupported spi modes detected\n");
		goto error;
	}
	if (spi->mode & SPI_CPOL)
		chip->ctl_reg |= BIT_CTL_CPOL;
	if (spi->mode & SPI_CPHA)