staging: wilc1000: fix build error on SPI
authorGlen Lee <glen.lee@atmel.com>
Tue, 27 Oct 2015 09:20:14 +0000 (18:20 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:05:56 +0000 (08:05 +0900)
wilc_netdev_init function has parameters to pass but no argument is passed
when bus type SPI is selected. Which causes build error.
This patch passes argument &wilc to the function wilc_netdev_init.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Fixes: 12ba5416dc77 ("staging: wilc1000: assign pointer of g_linux_wlan to sdio device data")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index 9f899daca52405ce13450ded4ac6240d5ccdc2bc..ded302a4ccb31829b288d06ffc4fbff0f0cd9475 100644 (file)
@@ -1736,6 +1736,10 @@ int wilc_netdev_init(struct wilc **wilc)
 /*The 1st function called after module inserted*/
 static int __init init_wilc_driver(void)
 {
+#ifdef WILC_SPI
+       struct wilc *wilc;
+#endif
+
 #if defined(WILC_DEBUGFS)
        if (wilc_debugfs_init() < 0) {
                PRINT_D(GENERIC_DBG, "fail to create debugfs for wilc driver\n");
@@ -1762,7 +1766,7 @@ static int __init init_wilc_driver(void)
        }
 #else
        PRINT_D(INIT_DBG, "Initializing netdev\n");
-       if (wilc_netdev_init())
+       if (wilc_netdev_init(&wilc))
                PRINT_ER("Couldn't initialize netdev\n");
        return 0;
 #endif