Merge tag 'thermal-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal...
[linux-2.6-microblaze.git] / drivers / thermal / sprd_thermal.c
index 4cde70d..3682edb 100644 (file)
@@ -322,8 +322,10 @@ static void sprd_thm_toggle_sensor(struct sprd_thermal_sensor *sen, bool on)
 {
        struct thermal_zone_device *tzd = sen->tzd;
 
-       tzd->ops->set_mode(tzd,
-               on ? THERMAL_DEVICE_ENABLED : THERMAL_DEVICE_DISABLED);
+       if (on)
+               thermal_zone_device_enable(tzd);
+       else
+               thermal_zone_device_disable(tzd);
 }
 
 static int sprd_thm_probe(struct platform_device *pdev)