]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
net: bcmdhd: Fix DT unregister
authorMichael Hsu <mhsu@nvidia.com>
Mon, 13 Jul 2015 00:18:17 +0000 (17:18 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 19 Sep 2015 15:15:58 +0000 (08:15 -0700)
Unregister platform driver if it was registered due to device tree
settings.

Bug 1630780

Change-Id: I9dd77a7ede32e73edbcbc5b93b536aacd74487d7
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/769164
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/net/wireless/bcmdhd/dhd_linux_platdev.c

index c30e6225b9ef2a30c2a04e07df7a8aea2a84d92f..5d88c4cbb163bb07fcfc7990cd74e205fb1c62a0 100644 (file)
@@ -662,9 +662,9 @@ void wifi_ctrlfunc_unregister_drv(void)
        struct device *dev1, *dev2, *dt_node;
        dev1 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME, wifi_platdev_match);
        dev2 = bus_find_device(&platform_bus_type, NULL, WIFI_PLAT_NAME2, wifi_platdev_match);
-       if (!dts_enabled)
-               if (dev1 == NULL && dev2 == NULL)
-                       return;
+       dt_node = of_find_compatible_node(NULL, NULL, "android,bcmdhd_wlan");
+       if (dev1 == NULL && dev2 == NULL && dt_node == NULL)
+               return;
 
        DHD_ERROR(("unregister wifi platform drivers\n"));
        if (dev1 || dt_node)