Commit ebc7abb3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

thermal: Constify the trip argument of the .get_trend() zone callback



Add 'const' to the definition of the 'trip' argument of the
.get_trend() thermal zone callback to indicate that the trip point
passed to it should not be modified by it and adjust the
callback functions implementing it, thermal_get_trend() in the
ACPI thermal driver and __ti_thermal_get_trend(), accordingly.

No intentional functional impact.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMichal Wilczynski <michal.wilczynski@intel.com>
parent 8a81cf96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -492,7 +492,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
}

static int thermal_get_trend(struct thermal_zone_device *thermal,
			     struct thermal_trip *trip,
			     const struct thermal_trip *trip,
			     enum thermal_trend *trend)
{
	struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
+2 −1
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@ static inline int __ti_thermal_get_temp(struct thermal_zone_device *tz, int *tem
}

static int __ti_thermal_get_trend(struct thermal_zone_device *tz,
				  struct thermal_trip *trip, enum thermal_trend *trend)
				  const struct thermal_trip *trip,
				  enum thermal_trend *trend)
{
	struct ti_thermal_data *data = thermal_zone_device_priv(tz);
	struct ti_bandgap *bgp;
+2 −2
Original line number Diff line number Diff line
@@ -80,8 +80,8 @@ struct thermal_zone_device_ops {
	int (*set_trip_hyst) (struct thermal_zone_device *, int, int);
	int (*get_crit_temp) (struct thermal_zone_device *, int *);
	int (*set_emul_temp) (struct thermal_zone_device *, int);
	int (*get_trend) (struct thermal_zone_device *, struct thermal_trip *,
			  enum thermal_trend *);
	int (*get_trend) (struct thermal_zone_device *,
			  const struct thermal_trip *, enum thermal_trend *);
	void (*hot)(struct thermal_zone_device *);
	void (*critical)(struct thermal_zone_device *);
};