Skip to content

Commit 0444d57

Browse files
committed
thermal: core: Relocate the struct thermal_governor definition
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>
1 parent 7454f2c commit 0444d57

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

drivers/thermal/thermal_core.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,31 @@ struct thermal_trip_desc {
2222
int threshold;
2323
};
2424

25+
/**
26+
* struct thermal_governor - structure that holds thermal governor information
27+
* @name: name of the governor
28+
* @bind_to_tz: callback called when binding to a thermal zone. If it
29+
* returns 0, the governor is bound to the thermal zone,
30+
* otherwise it fails.
31+
* @unbind_from_tz: callback called when a governor is unbound from a
32+
* thermal zone.
33+
* @throttle: callback called for every trip point even if temperature is
34+
* below the trip point temperature
35+
* @update_tz: callback called when thermal zone internals have changed, e.g.
36+
* thermal cooling instance was added/removed
37+
* @governor_list: node in thermal_governor_list (in thermal_core.c)
38+
*/
39+
struct thermal_governor {
40+
const char *name;
41+
int (*bind_to_tz)(struct thermal_zone_device *tz);
42+
void (*unbind_from_tz)(struct thermal_zone_device *tz);
43+
int (*throttle)(struct thermal_zone_device *tz,
44+
const struct thermal_trip *trip);
45+
void (*update_tz)(struct thermal_zone_device *tz,
46+
enum thermal_notify_event reason);
47+
struct list_head governor_list;
48+
};
49+
2550
/**
2651
* struct thermal_zone_device - structure for a thermal zone
2752
* @id: unique id number for each thermal zone

include/linux/thermal.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -126,31 +126,6 @@ struct thermal_cooling_device {
126126
#endif
127127
};
128128

129-
/**
130-
* struct thermal_governor - structure that holds thermal governor information
131-
* @name: name of the governor
132-
* @bind_to_tz: callback called when binding to a thermal zone. If it
133-
* returns 0, the governor is bound to the thermal zone,
134-
* otherwise it fails.
135-
* @unbind_from_tz: callback called when a governor is unbound from a
136-
* thermal zone.
137-
* @throttle: callback called for every trip point even if temperature is
138-
* below the trip point temperature
139-
* @update_tz: callback called when thermal zone internals have changed, e.g.
140-
* thermal cooling instance was added/removed
141-
* @governor_list: node in thermal_governor_list (in thermal_core.c)
142-
*/
143-
struct thermal_governor {
144-
const char *name;
145-
int (*bind_to_tz)(struct thermal_zone_device *tz);
146-
void (*unbind_from_tz)(struct thermal_zone_device *tz);
147-
int (*throttle)(struct thermal_zone_device *tz,
148-
const struct thermal_trip *trip);
149-
void (*update_tz)(struct thermal_zone_device *tz,
150-
enum thermal_notify_event reason);
151-
struct list_head governor_list;
152-
};
153-
154129
/* Structure to define Thermal Zone parameters */
155130
struct thermal_zone_params {
156131
const char *governor_name;

0 commit comments

Comments
 (0)