Skip to contentSkip to conversation

spi: altera: Use bits_per_word_mask

PATCH Applied Axel Lin 2 participants 2 messages Mar 5, 2014 – Mar 13, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/spi/spi-altera.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-altera.c +1 -0
index 1928b83..f83f626 100644
@@ -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);
Signature · 8 lines
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#1 lore raw
Quoted 3 lines · Axel Lin

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.