thermal: core: Relocate the struct thermal_governor definition
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Apr 2024 19:27:07 +0000 (21:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Apr 2024 14:01:50 +0000 (16:01 +0200)
Notice that struct thermal_governor is only used by the thermal core
and so move its definition to thermal_core.h.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.h
include/linux/thermal.h

index 9d3ef1e0645fd443c2939a39792c6a9db2b6b580..b461d9583834cfcf64f724cb52f1d96d6e46d9e4 100644 (file)
@@ -22,6 +22,31 @@ struct thermal_trip_desc {
        int threshold;
 };
 
+/**
+ * struct thermal_governor - structure that holds thermal governor information
+ * @name:      name of the governor
+ * @bind_to_tz: callback called when binding to a thermal zone.  If it
+ *             returns 0, the governor is bound to the thermal zone,
+ *             otherwise it fails.
+ * @unbind_from_tz:    callback called when a governor is unbound from a
+ *                     thermal zone.
+ * @throttle:  callback called for every trip point even if temperature is
+ *             below the trip point temperature
+ * @update_tz: callback called when thermal zone internals have changed, e.g.
+ *             thermal cooling instance was added/removed
+ * @governor_list:     node in thermal_governor_list (in thermal_core.c)
+ */
+struct thermal_governor {
+       const char *name;
+       int (*bind_to_tz)(struct thermal_zone_device *tz);
+       void (*unbind_from_tz)(struct thermal_zone_device *tz);
+       int (*throttle)(struct thermal_zone_device *tz,
+                       const struct thermal_trip *trip);
+       void (*update_tz)(struct thermal_zone_device *tz,
+                         enum thermal_notify_event reason);
+       struct list_head        governor_list;
+};
+
 /**
  * struct thermal_zone_device - structure for a thermal zone
  * @id:                unique id number for each thermal zone
index 62b174528cfe319df6208e5e1567bad47321692f..f1155c0439c4b487c76c5b3c79801e3caf8f45bc 100644 (file)
@@ -126,31 +126,6 @@ struct thermal_cooling_device {
 #endif
 };
 
-/**
- * struct thermal_governor - structure that holds thermal governor information
- * @name:      name of the governor
- * @bind_to_tz: callback called when binding to a thermal zone.  If it
- *             returns 0, the governor is bound to the thermal zone,
- *             otherwise it fails.
- * @unbind_from_tz:    callback called when a governor is unbound from a
- *                     thermal zone.
- * @throttle:  callback called for every trip point even if temperature is
- *             below the trip point temperature
- * @update_tz: callback called when thermal zone internals have changed, e.g.
- *             thermal cooling instance was added/removed
- * @governor_list:     node in thermal_governor_list (in thermal_core.c)
- */
-struct thermal_governor {
-       const char *name;
-       int (*bind_to_tz)(struct thermal_zone_device *tz);
-       void (*unbind_from_tz)(struct thermal_zone_device *tz);
-       int (*throttle)(struct thermal_zone_device *tz,
-                       const struct thermal_trip *trip);
-       void (*update_tz)(struct thermal_zone_device *tz,
-                         enum thermal_notify_event reason);
-       struct list_head        governor_list;
-};
-
 /* Structure to define Thermal Zone parameters */
 struct thermal_zone_params {
        const char *governor_name;