projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a75bd65
)
spi/bfin_spi: reject unsupported SPI modes
author
Mike Frysinger
<vapier@gentoo.org>
Thu, 25 Feb 2010 10:00:55 +0000
(10:00 +0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Mon, 18 Oct 2010 06:49:41 +0000
(
02:49
-0400)
Who knows what people will try!
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
drivers/spi/spi_bfin5xx.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi_bfin5xx.c
b/drivers/spi/spi_bfin5xx.c
index
18b313a
..
a91e556
100644
(file)
--- a/
drivers/spi/spi_bfin5xx.c
+++ b/
drivers/spi/spi_bfin5xx.c
@@
-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)