diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index e032b9bf4085..04bd5f5a806c 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -138,60 +138,6 @@ static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip,
 	return 0;
 }
 
-static int of_thermal_bind(struct thermal_zone_device *thermal,
-			   struct thermal_cooling_device *cdev)
-{
-	struct __thermal_zone *data = thermal->devdata;
-	int i;
-
-	if (!data || IS_ERR(data))
-		return -ENODEV;
-
-	/* find where to bind */
-	for (i = 0; i < data->num_tbps; i++) {
-		struct __thermal_bind_params *tbp = data->tbps + i;
-
-		if (tbp->cooling_device == cdev->np) {
-			int ret;
-
-			ret = thermal_zone_bind_cooling_device(thermal,
-						tbp->trip_id, cdev,
-						tbp->max,
-						tbp->min);
-			if (ret)
-				return ret;
-		}
-	}
-
-	return 0;
-}
-
-static int of_thermal_unbind(struct thermal_zone_device *thermal,
-			     struct thermal_cooling_device *cdev)
-{
-	struct __thermal_zone *data = thermal->devdata;
-	int i;
-
-	if (!data || IS_ERR(data))
-		return -ENODEV;
-
-	/* find where to unbind */
-	for (i = 0; i < data->num_tbps; i++) {
-		struct __thermal_bind_params *tbp = data->tbps + i;
-
-		if (tbp->cooling_device == cdev->np) {
-			int ret;
-
-			ret = thermal_zone_unbind_cooling_device(thermal,
-						tbp->trip_id, cdev);
-			if (ret)
-				return ret;
-		}
-	}
-
-	return 0;
-}
-
 static int of_thermal_get_mode(struct thermal_zone_device *tz,
 			       enum thermal_device_mode *mode)
 {
@@ -314,9 +260,6 @@ static struct thermal_zone_device_ops of_thermal_ops = {
 	.get_trip_hyst = of_thermal_get_trip_hyst,
 	.set_trip_hyst = of_thermal_set_trip_hyst,
 	.get_crit_temp = of_thermal_get_crit_temp,
-
-	.bind = of_thermal_bind,
-	.unbind = of_thermal_unbind,
 };
 
 /***   sensor API   ***/
@@ -553,6 +496,109 @@ static int thermal_of_populate_bind_params(struct device_node *np,
 	return ret;
 }
 
+int of_thermal_match_bind_param(struct thermal_zone_device *tz,
+				struct thermal_cooling_device *cdev)
+{
+	struct __thermal_zone *data = tz->devdata;
+	int i;
+
+	if (!data || IS_ERR(data))
+		return -ENODEV;
+
+	for (i = 0; i < data->num_tbps; i++) {
+		struct __thermal_bind_params *__tbp = data->tbps + i;
+
+		if (__tbp->cooling_device == cdev->np)
+			return 0;
+	}
+
+	return -1;
+}
+
+static unsigned long* thermal_of_build_trip_limits(struct __thermal_zone *__tz)
+{
+
+	struct __thermal_bind_params *__tbp = __tz->tbps;
+	unsigned long *limits;
+	int i;
+
+	limits = kcalloc(2 * __tz->ntrips, sizeof(*limits), GFP_KERNEL);
+	if (!limits)
+		return ERR_PTR(ENOMEM);
+
+	for (i = 0; i < __tz->num_tbps; i++) {
+		limits[ __tbp->trip_id * 2 ] = __tbp[i].min;
+		limits[ __tbp->trip_id * 2 + 1] = __tbp[i].max;
+	}
+
+	return limits;
+}
+
+static struct thermal_zone_params* of_thermal_populate_tzp(struct __thermal_zone *__tz)
+{
+	struct thermal_zone_params *tzp;
+	struct __thermal_bind_params *__tbp = __tz->tbps;
+	struct thermal_bind_params *tbp;
+	unsigned long *limits = NULL;
+	int err;
+	int i;
+
+	tzp = kzalloc(sizeof(*tzp), GFP_KERNEL);
+	if (!tzp)
+		return ERR_PTR(ENOMEM);
+
+	if (!__tbp || !__tz->num_tbps) {
+		err = ENODEV;
+		goto free_tzp;
+	}
+
+	tbp = kcalloc(__tz->num_tbps, sizeof(*tbp), GFP_KERNEL);
+	if (!tbp) {
+		err = ENOMEM;
+		goto free_tzp;
+	}
+
+	/* We have a number of trips in tz */
+	for (i = 0; i < __tz->num_tbps; i++) {
+		if (limits)
+			limits = kmemdup(&limits, 2 * __tz->ntrips * sizeof(*limits), GFP_KERNEL);
+		else
+			limits = thermal_of_build_trip_limits(__tz);
+
+		if (IS_ERR(limits)) {
+			err = ENOMEM;
+			goto free_tbp;
+		}
+
+		tbp[i].weight = __tbp[i].usage;
+		tbp[i].binding_limits = limits;
+		tbp[i].match = of_thermal_match_bind_param;
+	}
+
+	tzp->tbp = tbp;
+	tzp->num_tbps = __tz->num_tbps;
+
+	/* No hwmon because there might be hwmon drivers registering */
+	tzp->no_hwmon = true;
+
+	return tzp;
+
+	/* Error handling code */
+	free_tbp:
+		/* Free all the correctly allocated binding_limits */
+		for (i = 0; i < __tz->num_tbps; i++) {
+			if (tbp[i].binding_limits)
+				kfree(tbp[i].binding_limits);
+		}
+
+		/* Free the binding parameters */
+		kfree(tbp);
+
+	free_tzp:
+		kfree(tzp);
+		return ERR_PTR(err);
+}
+
 /**
  * It maps 'enum thermal_trip_type' found in include/linux/thermal.h
  * into the device tree binding of 'trip', property type.
@@ -812,15 +858,14 @@ int __init of_parse_thermal_zones(void)
 		if (!ops)
 			goto exit_free;
 
-		tzp = kzalloc(sizeof(*tzp), GFP_KERNEL);
-		if (!tzp) {
+
+		tzp = of_thermal_populate_tzp(tz);
+
+		if (IS_ERR(tzp)) {
 			kfree(ops);
 			goto exit_free;
 		}
 
-		/* No hwmon because there might be hwmon drivers registering */
-		tzp->no_hwmon = true;
-
 		if (!of_property_read_u32(child, "sustainable-power", &prop))
 			tzp->sustainable_power = prop;
  
