esp8089: fix ESP8089 wifi can not work when use CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOT
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / esp8089 / esp_driver / esp_init.c
index dee93eed9ec8cd09d9499f0f53626e10d6ca5ceb..09f18dcb99045e85ecf791f271c9fead1ee7217a 100755 (executable)
@@ -92,33 +92,20 @@ static void /*__exit */ esp_exit(void)
        esp_common_exit();
 }
 
-#include <linux/rfkill-wlan.h>
-extern int get_wifi_chip_type(void);
 
 int rockchip_wifi_init_module_esp8089(void)
 {
-#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
-    int type = get_wifi_chip_type();
-    if (type != WIFI_ESP8089) return 0;
-#endif
+
        return esp_init();
 }
 
 void rockchip_wifi_exit_module_esp8089(void)
 {
-#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
-    int type = get_wifi_chip_type();
-    if (type != WIFI_ESP8089) return;
-#endif
        esp_exit(); 
 }
 
-#ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP
-late_initcall(rockchip_wifi_init_module_esp8089);
-module_exit(rockchip_wifi_exit_module_esp8089);
-#else
 EXPORT_SYMBOL(rockchip_wifi_init_module_esp8089);
 EXPORT_SYMBOL(rockchip_wifi_exit_module_esp8089);
-#endif
+
 //module_init(esp_init);
 //module_exit(esp_exit);