]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi.c
Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux
[karo-tx-linux.git] / drivers / spi / spi.c
index 4fffb1f39def24d7ef6c87c2b89dd1c441ff8257..6f193b02a9e835e9efa2b5a42fa86949d5053cef 100644 (file)
@@ -1059,15 +1059,14 @@ EXPORT_SYMBOL_GPL(spi_alloc_master);
 #ifdef CONFIG_OF
 static int of_spi_register_master(struct spi_master *master)
 {
-       u16 nb;
-       int i, *cs;
+       int nb, i, *cs;
        struct device_node *np = master->dev.of_node;
 
        if (!np)
                return 0;
 
        nb = of_gpio_named_count(np, "cs-gpios");
-       master->num_chipselect = max(nb, master->num_chipselect);
+       master->num_chipselect = max(nb, (int)master->num_chipselect);
 
        if (nb < 1)
                return 0;