[PATCH] ath10k: Fix cleanup in ath10k_thermal_unregister

Mohammed Shafi Shajakhan mohammed at qti.qualcomm.com
Thu Oct 8 03:33:03 PDT 2015


From: Mohammed Shafi Shajakhan <mohammed at qti.qualcomm.com>

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 at qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index 1a899d7..60fe562 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -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);
 }
-- 
1.7.9.5




More information about the ath10k mailing list