Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 4acab50

Browse files
krzkrafaeljw
authored andcommitted
thermal: core: constify 'type' in devm_thermal_of_cooling_device_register()
The 'type' string passed to thermal_of_cooling_device_register() is a 'const char *', so do the same in the devm interface. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240703083141.96013-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 6fb75c9 commit 4acab50

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ static void thermal_cooling_device_release(struct device *dev, void *res)
11291129
struct thermal_cooling_device *
11301130
devm_thermal_of_cooling_device_register(struct device *dev,
11311131
struct device_node *np,
1132-
char *type, void *devdata,
1132+
const char *type, void *devdata,
11331133
const struct thermal_cooling_device_ops *ops)
11341134
{
11351135
struct thermal_cooling_device **ptr, *tcd;

include/linux/thermal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ thermal_of_cooling_device_register(struct device_node *np, const char *, void *,
261261
struct thermal_cooling_device *
262262
devm_thermal_of_cooling_device_register(struct device *dev,
263263
struct device_node *np,
264-
char *type, void *devdata,
264+
const char *type, void *devdata,
265265
const struct thermal_cooling_device_ops *ops);
266266
void thermal_cooling_device_update(struct thermal_cooling_device *);
267267
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
@@ -305,7 +305,7 @@ thermal_of_cooling_device_register(struct device_node *np,
305305
static inline struct thermal_cooling_device *
306306
devm_thermal_of_cooling_device_register(struct device *dev,
307307
struct device_node *np,
308-
char *type, void *devdata,
308+
const char *type, void *devdata,
309309
const struct thermal_cooling_device_ops *ops)
310310
{
311311
return ERR_PTR(-ENODEV);

0 commit comments

Comments
 (0)