aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/omap_uwire.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/omap_uwire.c')
-rw-r--r--drivers/spi/omap_uwire.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index 95183e1df525..d275c615a73e 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -445,10 +445,19 @@ done:
445 return status; 445 return status;
446} 446}
447 447
448/* the spi->mode bits understood by this driver: */
449#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)
450
448static int uwire_setup(struct spi_device *spi) 451static int uwire_setup(struct spi_device *spi)
449{ 452{
450 struct uwire_state *ust = spi->controller_state; 453 struct uwire_state *ust = spi->controller_state;
451 454
455 if (spi->mode & ~MODEBITS) {
456 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
457 spi->mode & ~MODEBITS);
458 return -EINVAL;
459 }
460
452 if (ust == NULL) { 461 if (ust == NULL) {
453 ust = kzalloc(sizeof(*ust), GFP_KERNEL); 462 ust = kzalloc(sizeof(*ust), GFP_KERNEL);
454 if (ust == NULL) 463 if (ust == NULL)