diff options
| author | Jean-Francois Dagenais <jeff.dagenais@gmail.com> | 2019-04-18 12:36:39 -0400 |
|---|---|---|
| committer | Zhang Rui <rui.zhang@intel.com> | 2019-05-06 08:35:11 -0400 |
| commit | f991de53a8abef21fae3e31967cb4f6a75c070b5 (patch) | |
| tree | 1924a52e49d6a2cc90a72020a5aa41b468f0fe36 /drivers | |
| parent | dc4060a5dc2557e6b5aa813bf5b73677299d62d2 (diff) | |
thermal: make device_register's type argument const
...because it can be, the buffer is strlcpy'd into a local buffer in a
thermal struct member.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thermal/thermal_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6590bb5cb688..b708b66fef94 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
| @@ -941,7 +941,7 @@ static void bind_cdev(struct thermal_cooling_device *cdev) | |||
| 941 | */ | 941 | */ |
| 942 | static struct thermal_cooling_device * | 942 | static struct thermal_cooling_device * |
| 943 | __thermal_cooling_device_register(struct device_node *np, | 943 | __thermal_cooling_device_register(struct device_node *np, |
| 944 | char *type, void *devdata, | 944 | const char *type, void *devdata, |
| 945 | const struct thermal_cooling_device_ops *ops) | 945 | const struct thermal_cooling_device_ops *ops) |
| 946 | { | 946 | { |
| 947 | struct thermal_cooling_device *cdev; | 947 | struct thermal_cooling_device *cdev; |
| @@ -1015,7 +1015,7 @@ __thermal_cooling_device_register(struct device_node *np, | |||
| 1015 | * ERR_PTR. Caller must check return value with IS_ERR*() helpers. | 1015 | * ERR_PTR. Caller must check return value with IS_ERR*() helpers. |
| 1016 | */ | 1016 | */ |
| 1017 | struct thermal_cooling_device * | 1017 | struct thermal_cooling_device * |
| 1018 | thermal_cooling_device_register(char *type, void *devdata, | 1018 | thermal_cooling_device_register(const char *type, void *devdata, |
| 1019 | const struct thermal_cooling_device_ops *ops) | 1019 | const struct thermal_cooling_device_ops *ops) |
| 1020 | { | 1020 | { |
| 1021 | return __thermal_cooling_device_register(NULL, type, devdata, ops); | 1021 | return __thermal_cooling_device_register(NULL, type, devdata, ops); |
| @@ -1039,7 +1039,7 @@ EXPORT_SYMBOL_GPL(thermal_cooling_device_register); | |||
| 1039 | */ | 1039 | */ |
| 1040 | struct thermal_cooling_device * | 1040 | struct thermal_cooling_device * |
| 1041 | thermal_of_cooling_device_register(struct device_node *np, | 1041 | thermal_of_cooling_device_register(struct device_node *np, |
| 1042 | char *type, void *devdata, | 1042 | const char *type, void *devdata, |
| 1043 | const struct thermal_cooling_device_ops *ops) | 1043 | const struct thermal_cooling_device_ops *ops) |
| 1044 | { | 1044 | { |
| 1045 | return __thermal_cooling_device_register(np, type, devdata, ops); | 1045 | return __thermal_cooling_device_register(np, type, devdata, ops); |
