]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal: core: constify 'type' in devm_thermal_of_cooling_device_register()
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 3 Jul 2024 08:31:41 +0000 (10:31 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Jul 2024 12:25:20 +0000 (14:25 +0200)
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>
drivers/thermal/thermal_core.c
include/linux/thermal.h

index 2aa04c46a425f43f9f6da5564f6a7834d5b5238b..3eb85301d32522b24a5f9f94244ae90729e99c0e 100644 (file)
@@ -1129,7 +1129,7 @@ static void thermal_cooling_device_release(struct device *dev, void *res)
 struct thermal_cooling_device *
 devm_thermal_of_cooling_device_register(struct device *dev,
                                struct device_node *np,
-                               char *type, void *devdata,
+                               const char *type, void *devdata,
                                const struct thermal_cooling_device_ops *ops)
 {
        struct thermal_cooling_device **ptr, *tcd;
index f1155c0439c4b487c76c5b3c79801e3caf8f45bc..f732dab203683702db82651cc8e0a4bd35b14672 100644 (file)
@@ -261,7 +261,7 @@ thermal_of_cooling_device_register(struct device_node *np, const char *, void *,
 struct thermal_cooling_device *
 devm_thermal_of_cooling_device_register(struct device *dev,
                                struct device_node *np,
-                               char *type, void *devdata,
+                               const char *type, void *devdata,
                                const struct thermal_cooling_device_ops *ops);
 void thermal_cooling_device_update(struct thermal_cooling_device *);
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
@@ -305,7 +305,7 @@ thermal_of_cooling_device_register(struct device_node *np,
 static inline struct thermal_cooling_device *
 devm_thermal_of_cooling_device_register(struct device *dev,
                                struct device_node *np,
-                               char *type, void *devdata,
+                               const char *type, void *devdata,
                                const struct thermal_cooling_device_ops *ops)
 {
        return ERR_PTR(-ENODEV);