#include <linux/platform_device.h>
 #include <linux/thermal.h>
 
+#include "../thermal_core.h"
 #include "../thermal_hwmon.h"
 
 #define BCM2835_TS_TSENSCTL                    0x00
         */
        val = readl(data->regs + BCM2835_TS_TSENSCTL);
        if (!(val & BCM2835_TS_TSENSCTL_RSTB)) {
-               int trip_temp, offset, slope;
+               struct thermal_trip trip;
+               int offset, slope;
 
                slope = thermal_zone_get_slope(tz);
                offset = thermal_zone_get_offset(tz);
                 * For now we deal only with critical, otherwise
                 * would need to iterate
                 */
-               err = tz->ops->get_trip_temp(tz, 0, &trip_temp);
+               err = thermal_zone_get_trip(tz, 0, &trip);
                if (err < 0) {
                        dev_err(&pdev->dev,
                                "Not able to read trip_temp: %d\n",
                val |= (0xFE << BCM2835_TS_TSENSCTL_RSTDELAY_SHIFT);
 
                /*  trip_adc value from info */
-               val |= bcm2835_thermal_temp2adc(trip_temp,
+               val |= bcm2835_thermal_temp2adc(trip.temperature,
                                                offset,
                                                slope)
                        << BCM2835_TS_TSENSCTL_THOLD_SHIFT;