thermal: int340x: processor_thermal: Set feature mask before proc_thermal_add
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 9 Oct 2023 19:05:34 +0000 (12:05 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 12 Oct 2023 19:09:48 +0000 (21:09 +0200)
commit6ebc25d8b053a208786295bab58abbb66b39c318
tree49fb01781e5c09f963a812642872479bcd2ff51d
parent088f16f35257becaed1c3deececda6080bc77ee3
thermal: int340x: processor_thermal: Set feature mask before proc_thermal_add

The function proc_thermal_add() adds sysfs entries for power limits.

The feature mask of available features is not present at that time, so
it cannot be used by proc_thermal_add() to selectively create sysfs
attributes.

The feature mask is set by proc_thermal_mmio_add(), so modify the code
to call it before proc_thermal_add() so as to allow the latter to use
the feature mask.

There is no functional impact with this change.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c