diff options
| author | Axel Lin <[email protected]> | 2014-03-05 13:37:00 +0800 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2014-03-13 09:55:28 +0000 |
| commit | 72bb79d042375586c4ad8def57d7932064d76090 (patch) | |
| tree | 6ab74328c05be5e87c873d37e6c34cd4b3480d15 | |
| parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
spi: altera: Use bits_per_word_mask
This driver does not work for bits_per_word greater than 16.
Set bits_per_word_mask so spi core will reject transfers that attempt to use
an unsupported bits_per_word value.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
| -rw-r--r-- | drivers/spi/spi-altera.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index 5d7deaf62867..aa33b56b7a92 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c @@ -214,6 +214,7 @@ static int altera_spi_probe(struct platform_device *pdev) master->bus_num = pdev->id; master->num_chipselect = 16; master->mode_bits = SPI_CS_HIGH; + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16); hw = spi_master_get_devdata(master); platform_set_drvdata(pdev, hw); |