diff mbox

spi: altera: Use bits_per_word_mask

Message ID 1393997820.19790.2.camel@phoenix (mailing list archive)
State Accepted
Commit 72bb79d042375586c4ad8def57d7932064d76090
Headers show

Commit Message

Axel Lin March 5, 2014, 5:37 a.m. UTC
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 <axel.lin@ingics.com>
---
 drivers/spi/spi-altera.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown March 13, 2014, 9:55 a.m. UTC | #1
On Wed, Mar 05, 2014 at 01:37:00PM +0800, Axel Lin wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 1928b83..f83f626 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -213,6 +213,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);