===================================================================
@@ -563,8 +563,7 @@ static int rcar_gen3_thermal_probe(struc
if (ret)
goto error_unregister;
- ret = thermal_zone_get_num_trips(tsc->zone);
- if (ret < 0)
+ if (thermal_zone_is_tripless(tsc->zone))
goto error_unregister;
dev_info(dev, "Sensor %u: Loaded %d trip points\n", i, ret);
===================================================================
@@ -55,11 +55,11 @@ int thermal_zone_for_each_trip(struct th
}
EXPORT_SYMBOL_GPL(thermal_zone_for_each_trip);
-int thermal_zone_get_num_trips(struct thermal_zone_device *tz)
+bool thermal_zone_is_tripless(struct thermal_zone_device *tz)
{
- return tz->num_trips;
+ return tz->num_trips == 0;
}
-EXPORT_SYMBOL_GPL(thermal_zone_get_num_trips);
+EXPORT_SYMBOL_GPL(thermal_zone_is_tripless);
/**
* thermal_zone_set_trips - Computes the next trip points for the driver
===================================================================
@@ -210,7 +210,7 @@ int for_each_thermal_trip(struct thermal
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
int (*cb)(struct thermal_trip *, void *),
void *data);
-int thermal_zone_get_num_trips(struct thermal_zone_device *tz);
+bool thermal_zone_is_tripless(struct thermal_zone_device *tz);
void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
struct thermal_trip *trip, int temp);