Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: at91-usart: Remove duplicated checking for spi->bits_per_word

This checking is already done in __spi_validate_bits_per_word().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
72dca1f6 55e3daca

+1 -7
+1 -7
drivers/spi/spi-at91-usart.c
··· 178 178 struct at91_usart_spi *aus = spi_master_get_devdata(spi->controller); 179 179 u32 *ausd = spi->controller_state; 180 180 unsigned int mr = at91_usart_spi_readl(aus, MR); 181 - u8 bits = spi->bits_per_word; 182 - 183 - if (bits != 8) { 184 - dev_dbg(&spi->dev, "Only 8 bits per word are supported\n"); 185 - return -EINVAL; 186 - } 187 181 188 182 if (spi->mode & SPI_CPOL) 189 183 mr |= US_MR_CPOL; ··· 206 212 207 213 dev_dbg(&spi->dev, 208 214 "setup: bpw %u mode 0x%x -> mr %d %08x\n", 209 - bits, spi->mode, spi->chip_select, mr); 215 + spi->bits_per_word, spi->mode, spi->chip_select, mr); 210 216 211 217 return 0; 212 218 }