Skip to content

Commit b377252

Browse files
AngeloGioacchino Del Regnorafaeljw
authored andcommitted
thermal: core: Change governor name to const char pointer
All users are already assigning a const char * to the `governor_name` member of struct thermal_zone_params and to the `name` member of struct thermal_governor. Even if users are technically wrong, it just makes more sense to change this member to be a const char pointer instead of doing the other way around. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 54d9400 commit b377252

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/thermal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ struct thermal_zone_device {
214214
* @governor_list: node in thermal_governor_list (in thermal_core.c)
215215
*/
216216
struct thermal_governor {
217-
char name[THERMAL_NAME_LENGTH];
217+
const char *name;
218218
int (*bind_to_tz)(struct thermal_zone_device *tz);
219219
void (*unbind_from_tz)(struct thermal_zone_device *tz);
220220
int (*throttle)(struct thermal_zone_device *tz,
@@ -226,7 +226,7 @@ struct thermal_governor {
226226

227227
/* Structure to define Thermal Zone parameters */
228228
struct thermal_zone_params {
229-
char governor_name[THERMAL_NAME_LENGTH];
229+
const char *governor_name;
230230

231231
/*
232232
* a boolean to indicate if the thermal to hwmon sysfs interface

0 commit comments

Comments
 (0)