]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/thermal/ti-soc-thermal/ti-thermal-common.c
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[mirror_ubuntu-bionic-kernel.git] / drivers / thermal / ti-soc-thermal / ti-thermal-common.c
index 096fb2141b2879ffa72f08387181e6ca5006aa22..3fb054a10f6a0fde450e29a98ee4cdf90e18f6c7 100644 (file)
@@ -285,6 +285,11 @@ static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal,
        return ti_thermal_get_trip_temp(thermal, OMAP_TRIP_NUMBER - 1, temp);
 }
 
+static const struct thermal_zone_of_device_ops ti_of_thermal_ops = {
+       .get_temp = __ti_thermal_get_temp,
+       .get_trend = __ti_thermal_get_trend,
+};
+
 static struct thermal_zone_device_ops ti_thermal_ops = {
        .get_temp = ti_thermal_get_temp,
        .get_trend = ti_thermal_get_trend,
@@ -332,8 +337,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
 
        /* in case this is specified by DT */
        data->ti_thermal = thermal_zone_of_sensor_register(bgp->dev, id,
-                                       data, __ti_thermal_get_temp,
-                                       __ti_thermal_get_trend);
+                                       data, &ti_of_thermal_ops);
        if (IS_ERR(data->ti_thermal)) {
                /* Create thermal zone */
                data->ti_thermal = thermal_zone_device_register(domain,