Skip to content

Commit 79f194d

Browse files
committed
thermal: trip: Get rid of thermal_zone_get_num_trips()
The only existing caller of thermal_zone_get_num_trips(), which is rcar_gen3_thermal_probe(), uses this function to put the number of trip points into a kernel log message, but this information is also available from the thermal sysfs interface. For this reason, remove the thermal_zone_get_num_trips() call from rcar_gen3_thermal_probe() and drop the former altogether. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 96d8199 commit 79f194d

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

drivers/thermal/renesas/rcar_gen3_thermal.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
563563
if (ret)
564564
goto error_unregister;
565565

566-
ret = thermal_zone_get_num_trips(tsc->zone);
567-
if (ret < 0)
568-
goto error_unregister;
569-
570-
dev_info(dev, "Sensor %u: Loaded %d trip points\n", i, ret);
566+
dev_info(dev, "Sensor %u: Loaded\n", i);
571567
}
572568

573569
if (!priv->num_tscs) {

drivers/thermal/thermal_trip.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
5555
}
5656
EXPORT_SYMBOL_GPL(thermal_zone_for_each_trip);
5757

58-
int thermal_zone_get_num_trips(struct thermal_zone_device *tz)
59-
{
60-
return tz->num_trips;
61-
}
62-
EXPORT_SYMBOL_GPL(thermal_zone_get_num_trips);
63-
6458
/**
6559
* thermal_zone_set_trips - Computes the next trip points for the driver
6660
* @tz: a pointer to a thermal zone device structure

include/linux/thermal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ int for_each_thermal_trip(struct thermal_zone_device *tz,
210210
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
211211
int (*cb)(struct thermal_trip *, void *),
212212
void *data);
213-
int thermal_zone_get_num_trips(struct thermal_zone_device *tz);
214213
void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
215214
struct thermal_trip *trip, int temp);
216215

0 commit comments

Comments
 (0)