spi: dw: Convert dw_spi::num_cs to u32
authorSerge Semin <fancer.lancer@gmail.com>
Wed, 24 Apr 2024 15:06:44 +0000 (18:06 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 3 May 2024 02:09:24 +0000 (11:09 +0900)
Number of native chip-select lines is either retrieved from the "num-cs"
DT-property or auto-detected in the generic DW APB/AHB SSI probe method.
In the former case the property is supposed to be of the "u32" size.
Convert the field type to being u32 then to be able to drop the temporary
variable afterwards.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240424150657.9678-4-fancer.lancer@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.h

index 6cafeee8ee2a9a2d48816807c62e288685d6da0e..fc267c6437ae095e37de78b480856ca8deb5656e 100644 (file)
@@ -164,8 +164,8 @@ struct dw_spi {
        u32                     max_freq;       /* max bus freq supported */
 
        u32                     reg_io_width;   /* DR I/O width in bytes */
+       u32                     num_cs;         /* chip select lines */
        u16                     bus_num;
-       u16                     num_cs;         /* supported slave numbers */
        void (*set_cs)(struct spi_device *spi, bool enable);
 
        /* Current message transfer state info */