aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-xcomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-xcomm.c')
-rw-r--r--drivers/spi/spi-xcomm.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index 4d3ec8b9f479..4258c712ad3c 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -76,7 +76,7 @@ static int spi_xcomm_setup_transfer(struct spi_xcomm *spi_xcomm,
76{ 76{
77 unsigned int speed; 77 unsigned int speed;
78 78
79 if ((t->bits_per_word && t->bits_per_word != 8) || t->len > 62) 79 if (t->len > 62)
80 return -EINVAL; 80 return -EINVAL;
81 81
82 speed = t->speed_hz ? t->speed_hz : spi->max_speed_hz; 82 speed = t->speed_hz ? t->speed_hz : spi->max_speed_hz;
@@ -209,14 +209,6 @@ static int spi_xcomm_transfer_one(struct spi_master *master,
209 return status; 209 return status;
210} 210}
211 211
212static int spi_xcomm_setup(struct spi_device *spi)
213{
214 if (spi->bits_per_word != 8)
215 return -EINVAL;
216
217 return 0;
218}
219
220static int spi_xcomm_probe(struct i2c_client *i2c, 212static int spi_xcomm_probe(struct i2c_client *i2c,
221 const struct i2c_device_id *id) 213 const struct i2c_device_id *id)
222{ 214{
@@ -233,8 +225,8 @@ static int spi_xcomm_probe(struct i2c_client *i2c,
233 225
234 master->num_chipselect = 16; 226 master->num_chipselect = 16;
235 master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_3WIRE; 227 master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_3WIRE;
228 master->bits_per_word_mask = SPI_BPW_MASK(8);
236 master->flags = SPI_MASTER_HALF_DUPLEX; 229 master->flags = SPI_MASTER_HALF_DUPLEX;
237 master->setup = spi_xcomm_setup;
238 master->transfer_one_message = spi_xcomm_transfer_one; 230 master->transfer_one_message = spi_xcomm_transfer_one;
239 master->dev.of_node = i2c->dev.of_node; 231 master->dev.of_node = i2c->dev.of_node;
240 i2c_set_clientdata(i2c, master); 232 i2c_set_clientdata(i2c, master);