Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[firefly-linux-kernel-4.4.55.git] / drivers / spi / spi-au1550.c
index f45e085c01a616436f7a6b115e69bb8144012463..afd239d6dec1432350b1fdc5cf3e58c43562dff6 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)