These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / spi / spi-au1550.c
index f45e085..afd239d 100644 (file)
@@ -233,13 +233,12 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t)
        unsigned bpw, hz;
        u32 cfg, stat;
 
-       bpw = spi->bits_per_word;
-       hz = spi->max_speed_hz;
        if (t) {
-               if (t->bits_per_word)
-                       bpw = t->bits_per_word;
-               if (t->speed_hz)
-                       hz = t->speed_hz;
+               bpw = t->bits_per_word;
+               hz = t->speed_hz;
+       } else {
+               bpw = spi->bits_per_word;
+               hz = spi->max_speed_hz;
        }
 
        if (!hz)