Skip to content

Commit

Permalink
thermal: core: Change governor name to const char pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AngeloGioacchino Del Regno authored and Rafael J. Wysocki committed Feb 2, 2024
1 parent 54d9400 commit b377252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ struct thermal_zone_device {
* @governor_list: node in thermal_governor_list (in thermal_core.c)
*/
struct thermal_governor {
char name[THERMAL_NAME_LENGTH];
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,
Expand All @@ -226,7 +226,7 @@ struct thermal_governor {

/* Structure to define Thermal Zone parameters */
struct thermal_zone_params {
char governor_name[THERMAL_NAME_LENGTH];
const char *governor_name;

/*
* a boolean to indicate if the thermal to hwmon sysfs interface
Expand Down

0 comments on commit b377252

Please sign in to comment.