From 3d4e1bad7804bee102bb1e992f2831e4c6658f88 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Wed, 1 Mar 2023 21:14:32 +0100 Subject: 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 Acked-by: Mark Brown Reviewed-by: Ido Schimmel #mlxsw Acked-by: Gregory Greenman #iwlwifi Acked-by: Sebastian Reichel #power_supply Acked-by: Damien Le Moal #ahci Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet/chelsio') diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c index 95e1b415ba13..dea9d2907666 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c @@ -12,7 +12,7 @@ static int cxgb4_thermal_get_temp(struct thermal_zone_device *tzdev, int *temp) { - struct adapter *adap = tzdev->devdata; + struct adapter *adap = thermal_zone_device_priv(tzdev); u32 param, val; int ret; -- cgit