On Tue, 18 Dec 2012 14:25:43 +0530, Laxman Dewangan<ldewangan@xxxxxxxxxx> wrote:The spi core make sure that each transfer structure have the proper[...]
setting for bits_per_word before calling low level transfer APIs.
Hence it is no more require to check again in low level driver for
this field whether this is set correct or not. Removing such code
from low level driver.
Signed-off-by: Laxman Dewangan<ldewangan@xxxxxxxxxx>*/Have you verified here that bits_per_word can never be '0' here? What is
if (prev_speed_hz != speed_hz
@@ -316,9 +315,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m)
/* check each transfer's parameters */
list_for_each_entry (t,&m->transfers, transfer_list) {
u32 speed_hz = t->speed_hz ? : spi->max_speed_hz;
- u8 bits_per_word = t->bits_per_word ? : spi->bits_per_word;
+ u8 bits_per_word = t->bits_per_word;
- bits_per_word = bits_per_word ? : 8;
the path that ensures spi->bits_per_word (and hence t->bits_per_word) is
set to 8 here?
Otherwise the patch looks good. Thanks for doing this work.