Skip to contentSkip to conversation

thermal: intel: int340x_thermal: Use thermal zone accessor functions

PATCH In review Rafael J. Wysocki 2 participants 2 messages Mar 5, 2024 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: intel: int340x_thermal: Use thermal zone accessor functions

From: Rafael J. Wysocki <[email protected]>

Make int340x_thermal use the dedicated accessor functions for the thermal zone device object address and the thermal zone type string.

This is requisite for future thermal core improvements.

---
 drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +2 -1
Index: linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
===================================================================
@@ -58,7 +58,8 @@ static int int340x_thermal_set_trip_temp
 
 static void int340x_thermal_critical(struct thermal_zone_device *zone)
 {
-	dev_dbg(&zone->device, "%s: critical temperature reached\n", zone->type);
+	dev_dbg(thermal_zone_device(zone), "%s: critical temperature reached\n",
+		thermal_zone_device_type(zone));
 }
 
 static inline void *int_to_trip_priv(int i)
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Make int340x_thermal use the dedicated accessor functions for the thermal zone device object address and the thermal zone type string.

This is requisite for future thermal core improvements.

Quoted 28 lines

---
 drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c |    3
++-

 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux- pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
===================================================================
--- linux- pm.orig/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ linux- pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c

(quoted diff) +0 -0
@@ -58,7 +58,8 @@ static int int340x_thermal_set_trip_temp


 static void int340x_thermal_critical(struct thermal_zone_device *zone)
 {
-       dev_dbg(&zone->device, "%s: critical temperature reached\n", zone->type);
+       dev_dbg(thermal_zone_device(zone), "%s: critical temperature reached\n",
+               thermal_zone_device_type(zone));
 }

 static inline void *int_to_trip_priv(int i)