Skip to content

Commit

Permalink
thermal: intel: intel_soc_dts_iosf: Pass sensors to update_trip_temp()
Browse files Browse the repository at this point in the history
After previous changes, update_trip_temp() only uses its dts argument to
get to the sensors field in the struct intel_soc_dts_sensor_entry object
pointed to by that argument, so pass the value of that field directly to
it instead.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
  • Loading branch information
Rafael J. Wysocki committed Aug 11, 2023
1 parent 0b28ba2 commit cbc2805
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/thermal/intel/intel_soc_dts_iosf.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static int sys_get_trip_temp(struct thermal_zone_device *tzd, int trip,
return 0;
}

static int update_trip_temp(struct intel_soc_dts_sensor_entry *dts,
static int update_trip_temp(struct intel_soc_dts_sensors *sensors,
int thres_index, int temp)
{
int status;
Expand All @@ -78,7 +78,6 @@ static int update_trip_temp(struct intel_soc_dts_sensor_entry *dts,
u32 store_te_out;
u32 te_out;
u32 int_enable_bit = SOC_DTS_TE_APICA_ENABLE;
struct intel_soc_dts_sensors *sensors = dts->sensors;

if (sensors->intr_type == INTEL_SOC_DTS_INTERRUPT_MSI)
int_enable_bit |= SOC_DTS_TE_MSI_ENABLE;
Expand Down Expand Up @@ -162,7 +161,7 @@ static int configure_trip(struct intel_soc_dts_sensor_entry *dts,
{
int ret;

ret = update_trip_temp(dts, thres_index, temp);
ret = update_trip_temp(dts->sensors, thres_index, temp);
if (ret)
return ret;

Expand All @@ -182,7 +181,7 @@ static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip,
return -EINVAL;

mutex_lock(&sensors->dts_update_lock);
status = update_trip_temp(dts, trip, temp);
status = update_trip_temp(sensors, trip, temp);
mutex_unlock(&sensors->dts_update_lock);

return status;
Expand Down

0 comments on commit cbc2805

Please sign in to comment.