Skip to content

Commit

Permalink
spi: altera: Use bits_per_word_mask
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 13, 2014
1 parent 38dbfb5 commit 72bb79d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi-altera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 72bb79d

Please sign in to comment.