diff options
Diffstat (limited to 'drivers/spi/spi-s3c24xx.c')
-rw-r--r-- | drivers/spi/spi-s3c24xx.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index 746424aa5353..f1ffbfa6acef 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c | |||
@@ -123,25 +123,15 @@ static int s3c24xx_spi_update_state(struct spi_device *spi, | |||
123 | { | 123 | { |
124 | struct s3c24xx_spi *hw = to_hw(spi); | 124 | struct s3c24xx_spi *hw = to_hw(spi); |
125 | struct s3c24xx_spi_devstate *cs = spi->controller_state; | 125 | struct s3c24xx_spi_devstate *cs = spi->controller_state; |
126 | unsigned int bpw; | ||
127 | unsigned int hz; | 126 | unsigned int hz; |
128 | unsigned int div; | 127 | unsigned int div; |
129 | unsigned long clk; | 128 | unsigned long clk; |
130 | 129 | ||
131 | bpw = t ? t->bits_per_word : spi->bits_per_word; | ||
132 | hz = t ? t->speed_hz : spi->max_speed_hz; | 130 | hz = t ? t->speed_hz : spi->max_speed_hz; |
133 | 131 | ||
134 | if (!bpw) | ||
135 | bpw = 8; | ||
136 | |||
137 | if (!hz) | 132 | if (!hz) |
138 | hz = spi->max_speed_hz; | 133 | hz = spi->max_speed_hz; |
139 | 134 | ||
140 | if (bpw != 8) { | ||
141 | dev_err(&spi->dev, "invalid bits-per-word (%d)\n", bpw); | ||
142 | return -EINVAL; | ||
143 | } | ||
144 | |||
145 | if (spi->mode != cs->mode) { | 135 | if (spi->mode != cs->mode) { |
146 | u8 spcon = SPCON_DEFAULT | S3C2410_SPCON_ENSCK; | 136 | u8 spcon = SPCON_DEFAULT | S3C2410_SPCON_ENSCK; |
147 | 137 | ||
@@ -544,6 +534,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) | |||
544 | 534 | ||
545 | master->num_chipselect = hw->pdata->num_cs; | 535 | master->num_chipselect = hw->pdata->num_cs; |
546 | master->bus_num = pdata->bus_num; | 536 | master->bus_num = pdata->bus_num; |
537 | master->bits_per_word_mask = SPI_BPW_MASK(8); | ||
547 | 538 | ||
548 | /* setup the state for the bitbang driver */ | 539 | /* setup the state for the bitbang driver */ |
549 | 540 | ||