ath10k: fix cleanup in ath10k_thermal_unregister
authorMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Thu, 8 Oct 2015 10:33:03 +0000 (16:03 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 14 Oct 2015 05:59:08 +0000 (08:59 +0300)
First remove the 'cooling_device#n' syslink created
for ath10k and then unregsiter from the thermal subsystem(cooling)

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/thermal.c

index 1a899d70dc5db5e6dea73280a42f06218285de77..60fe562e304110435a481f2e8fcf6181efb11688 100644 (file)
@@ -215,6 +215,6 @@ err_cooling_destroy:
 
 void ath10k_thermal_unregister(struct ath10k *ar)
 {
-       thermal_cooling_device_unregister(ar->thermal.cdev);
        sysfs_remove_link(&ar->dev->kobj, "cooling_device");
+       thermal_cooling_device_unregister(ar->thermal.cdev);
 }