summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2023-03-01 23:14:32 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-03-03 22:45:02 +0300
commit3d4e1bad7804bee102bb1e992f2831e4c6658f88 (patch)
tree3de9ffe344b16145859fca264a83871d53ea6ae3 /drivers/net/wireless/intel/iwlwifi/mvm/tt.c
parent0ce637a5469139f901c3047e507afcf17bd00f43 (diff)
downloadlinux-3d4e1bad7804bee102bb1e992f2831e4c6658f88.tar.xz
thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers
The thermal zone device structure is exposed to the different drivers and obviously they access the internals while that should be restricted to the core thermal code. In order to self-encapsulate the thermal core code, we need to prevent the drivers accessing directly the thermal zone structure and provide accessor functions to deal with. Use the devdata accessor introduced in the previous patch. No functional changes intended. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw Acked-by: Gregory Greenman <gregory.greenman@intel.com> #iwlwifi Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> #power_supply Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> #ahci Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/tt.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 232c200af38f..354d95222b1b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -615,7 +615,7 @@ send:
static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
int *temperature)
{
- struct iwl_mvm *mvm = (struct iwl_mvm *)device->devdata;
+ struct iwl_mvm *mvm = thermal_zone_device_priv(device);
int ret;
int temp;
@@ -641,7 +641,7 @@ out:
static int iwl_mvm_tzone_set_trip_temp(struct thermal_zone_device *device,
int trip, int temp)
{
- struct iwl_mvm *mvm = (struct iwl_mvm *)device->devdata;
+ struct iwl_mvm *mvm = thermal_zone_device_priv(device);
struct iwl_mvm_thermal_device *tzone;
int ret;