Merge tag 'microblaze-v5.12' of git://git.monstr.eu/linux-2.6-microblaze
[linux-2.6-microblaze.git] / drivers / thermal / ti-soc-thermal / ti-thermal-common.c
index 2ce4b19..f843758 100644 (file)
@@ -166,6 +166,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
                             char *domain)
 {
        struct ti_thermal_data *data;
+       int interval;
 
        data = ti_bandgap_get_sensor_data(bgp, id);
 
@@ -183,9 +184,10 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
                return PTR_ERR(data->ti_thermal);
        }
 
+       interval = jiffies_to_msecs(data->ti_thermal->polling_delay_jiffies);
+
        ti_bandgap_set_sensor_data(bgp, id, data);
-       ti_bandgap_write_update_interval(bgp, data->sensor_id,
-                                       data->ti_thermal->polling_delay);
+       ti_bandgap_write_update_interval(bgp, data->sensor_id, interval);
 
        return 0;
 }