]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/of-thermal.c
thermal: of: Enable thermal_zoneX when sensor is correctly added
[karo-tx-linux.git] / drivers / thermal / of-thermal.c
index d717f3dab6f1410fc955daefb0497c2096298b56..668fb1bdea9eff9b0443453430f1de92335c4104 100644 (file)
@@ -497,6 +497,9 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data,
                if (sensor_specs.np == sensor_np && id == sensor_id) {
                        tzd = thermal_zone_of_add_sensor(child, sensor_np,
                                                         data, ops);
+                       if (!IS_ERR(tzd))
+                               tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED);
+
                        of_node_put(sensor_specs.np);
                        of_node_put(child);
                        goto exit;