瀏覽代碼

[DM/THERMAL] Fixup the PWM-FAN remove handle data ptr

Signed-off-by: GuEe-GUI <2991707448@qq.com>
GuEe-GUI 2 周之前
父節點
當前提交
1892b27a45
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/drivers/thermal/thermal-cool-pwm-fan.c

+ 1 - 1
components/drivers/thermal/thermal-cool-pwm-fan.c

@@ -255,7 +255,7 @@ _fail:
 
 
 static rt_err_t pwm_fan_cool_remove(struct rt_platform_device *pdev)
 static rt_err_t pwm_fan_cool_remove(struct rt_platform_device *pdev)
 {
 {
-    struct pwm_fan_cool *pf_cool = pdev->parent.ofw_node;
+    struct pwm_fan_cool *pf_cool = pdev->parent.user_data;
 
 
     rt_thermal_cooling_device_unregister(&pf_cool->parent);
     rt_thermal_cooling_device_unregister(&pf_cool->parent);