Fix rt parameter setting for spi device
authorMiroslav Ondra <ondra@faster.cz>
Sun, 25 Apr 2021 10:55:05 +0000 (12:55 +0200)
committerMiroslav Ondra <ondra@faster.cz>
Sun, 25 Apr 2021 10:55:05 +0000 (12:55 +0200)
modules/unipi/src/unipi_spi.c

index b6576ee58d82ed1e6adcbc3c5626bb133fc1a46a..284103773f34e62c43eb7df7ae01595713817772 100644 (file)
@@ -1238,7 +1238,9 @@ s32 neuronspi_spi_probe(struct spi_device *spi)
        spi->bits_per_word      = 8;
        spi->mode                   = spi->mode ? spi->mode : SPI_MODE_0;
        spi->max_speed_hz       = spi->max_speed_hz ? spi->max_speed_hz : 12000000;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
        spi->rt = 1;
+#endif
        ret = spi_setup(spi);
        if (ret) {
         kfree(n_spi);