spi: convert drivers to use bits_per_word_mask
Fill in the recently added spi_master.bits_per_word_mask field in as many drivers as possible. Make related cleanups, such as removing any redundant error-checking, or empty setup callbacks. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:

committed by
Mark Brown

parent
2922a8de99
commit
24778be20f
@@ -698,11 +698,10 @@ static int spi_imx_setupxfer(struct spi_device *spi,
|
||||
} else if (config.bpw <= 16) {
|
||||
spi_imx->rx = spi_imx_buf_rx_u16;
|
||||
spi_imx->tx = spi_imx_buf_tx_u16;
|
||||
} else if (config.bpw <= 32) {
|
||||
}
|
||||
spi_imx->rx = spi_imx_buf_rx_u32;
|
||||
spi_imx->tx = spi_imx_buf_tx_u32;
|
||||
} else
|
||||
BUG();
|
||||
}
|
||||
|
||||
spi_imx->devtype_data->config(spi_imx, &config);
|
||||
|
||||
@@ -783,6 +782,7 @@ static int spi_imx_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, master);
|
||||
|
||||
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
|
||||
master->bus_num = pdev->id;
|
||||
master->num_chipselect = num_cs;
|
||||
|
||||
|
Reference in New Issue
Block a user