diff --git a/components/drivers/thermal/thermal-cool-pwm-fan.c b/components/drivers/thermal/thermal-cool-pwm-fan.c index d6c25392f18..69a08998969 100644 --- a/components/drivers/thermal/thermal-cool-pwm-fan.c +++ b/components/drivers/thermal/thermal-cool-pwm-fan.c @@ -255,7 +255,7 @@ static rt_err_t pwm_fan_cool_probe(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); diff --git a/components/drivers/thermal/thermal.c b/components/drivers/thermal/thermal.c index 7832153f6fd..7a5016dabc0 100644 --- a/components/drivers/thermal/thermal.c +++ b/components/drivers/thermal/thermal.c @@ -223,6 +223,7 @@ static void thermal_ofw_setup(struct rt_ofw_node *np, struct rt_thermal_zone_dev } } _end: + ; } #else rt_inline void thermal_ofw_setup(struct rt_ofw_node *np, struct rt_thermal_zone_device *zdev)