Merge tag 'imx-fixes-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
[firefly-linux-kernel-4.4.55.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;