diff options
Diffstat (limited to 'drivers/spi/spi_imx.c')
-rw-r--r-- | drivers/spi/spi_imx.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 26d5ef06dbd..c195e45f7f3 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c | |||
@@ -1171,9 +1171,6 @@ msg_rejected: | |||
1171 | return -EINVAL; | 1171 | return -EINVAL; |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* the spi->mode bits understood by this driver: */ | ||
1175 | #define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH) | ||
1176 | |||
1177 | /* On first setup bad values must free chip_data memory since will cause | 1174 | /* On first setup bad values must free chip_data memory since will cause |
1178 | spi_new_device to fail. Bad value setup from protocol driver are simply not | 1175 | spi_new_device to fail. Bad value setup from protocol driver are simply not |
1179 | applied and notified to the calling driver. */ | 1176 | applied and notified to the calling driver. */ |
@@ -1186,12 +1183,6 @@ static int setup(struct spi_device *spi) | |||
1186 | u32 tmp; | 1183 | u32 tmp; |
1187 | int status = 0; | 1184 | int status = 0; |
1188 | 1185 | ||
1189 | if (spi->mode & ~MODEBITS) { | ||
1190 | dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n", | ||
1191 | spi->mode & ~MODEBITS); | ||
1192 | return -EINVAL; | ||
1193 | } | ||
1194 | |||
1195 | /* Get controller data */ | 1186 | /* Get controller data */ |
1196 | chip_info = spi->controller_data; | 1187 | chip_info = spi->controller_data; |
1197 | 1188 | ||
@@ -1478,6 +1469,9 @@ static int __init spi_imx_probe(struct platform_device *pdev) | |||
1478 | drv_data->master_info = platform_info; | 1469 | drv_data->master_info = platform_info; |
1479 | drv_data->pdev = pdev; | 1470 | drv_data->pdev = pdev; |
1480 | 1471 | ||
1472 | /* the spi->mode bits understood by this driver: */ | ||
1473 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; | ||
1474 | |||
1481 | master->bus_num = pdev->id; | 1475 | master->bus_num = pdev->id; |
1482 | master->num_chipselect = platform_info->num_chipselect; | 1476 | master->num_chipselect = platform_info->num_chipselect; |
1483 | master->dma_alignment = DMA_ALIGNMENT; | 1477 | master->dma_alignment = DMA_ALIGNMENT; |