diff options
author | Jean-Francois Dagenais <jeff.dagenais@gmail.com> | 2019-04-18 19:36:39 +0300 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2019-05-06 15:35:11 +0300 |
commit | f991de53a8abef21fae3e31967cb4f6a75c070b5 (patch) | |
tree | 1924a52e49d6a2cc90a72020a5aa41b468f0fe36 /drivers/thermal/thermal_core.c | |
parent | dc4060a5dc2557e6b5aa813bf5b73677299d62d2 (diff) | |
download | linux-f991de53a8abef21fae3e31967cb4f6a75c070b5.tar.xz |
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/thermal/thermal_core.c')
-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) */ static struct thermal_cooling_device * __thermal_cooling_device_register(struct device_node *np, - char *type, void *devdata, + const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { struct thermal_cooling_device *cdev; @@ -1015,7 +1015,7 @@ __thermal_cooling_device_register(struct device_node *np, * ERR_PTR. Caller must check return value with IS_ERR*() helpers. */ struct thermal_cooling_device * -thermal_cooling_device_register(char *type, void *devdata, +thermal_cooling_device_register(const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return __thermal_cooling_device_register(NULL, type, devdata, ops); @@ -1039,7 +1039,7 @@ EXPORT_SYMBOL_GPL(thermal_cooling_device_register); */ struct thermal_cooling_device * thermal_of_cooling_device_register(struct device_node *np, - char *type, void *devdata, + const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return __thermal_cooling_device_register(np, type, devdata, ops); |