* [PATCH] thermal: update header and documentation
@ 2019-10-16 16:40 Wei Wang
0 siblings, 0 replies; only message in thread
From: Wei Wang @ 2019-10-16 16:40 UTC (permalink / raw)
Cc: wei.vince.wang, Wei Wang, Jonathan Corbet, Zhang Rui,
Eduardo Valentin, Daniel Lezcano, Amit Kucheria,
Mauro Carvalho Chehab, Guenter Roeck, linux-doc, linux-kernel,
linux-pm
The commit commit f991de53a8ab ("thermal: make device_register's type
argument const") changed APIs, but only when CONFIG_THERMAL enabled case.
This patch is partial from https://lkml.org/lkml/2019/5/14/631 which
tries to address the same concern,
Signed-off-by: Wei Wang <wvw@google.com>
---
Documentation/driver-api/thermal/sysfs-api.rst | 4 ++--
include/linux/thermal.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst
index fab2c9b36d08..0ef337417922 100644
--- a/Documentation/driver-api/thermal/sysfs-api.rst
+++ b/Documentation/driver-api/thermal/sysfs-api.rst
@@ -39,7 +39,7 @@ temperature) and throttle appropriate devices.
::
struct thermal_zone_device
- *thermal_zone_device_register(char *type,
+ *thermal_zone_device_register(const char *type,
int trips, int mask, void *devdata,
struct thermal_zone_device_ops *ops,
const struct thermal_zone_params *tzp,
@@ -221,7 +221,7 @@ temperature) and throttle appropriate devices.
::
struct thermal_cooling_device
- *thermal_cooling_device_register(char *name,
+ *thermal_cooling_device_register(const char *name,
void *devdata, struct thermal_cooling_device_ops *)
This interface function adds a new thermal cooling device (fan/processor/...)
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e45659c75920..ee235a29294e 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -501,12 +501,12 @@ static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
{ }
static inline 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 ERR_PTR(-ENODEV); }
static inline struct thermal_cooling_device *
-thermal_of_cooling_device_register(struct device_node *np,
- char *type, void *devdata, const struct thermal_cooling_device_ops *ops)
+thermal_of_cooling_device_register(struct device_node *np, const char *type,
+ void *devdata, const struct thermal_cooling_device_ops *ops)
{ return ERR_PTR(-ENODEV); }
static inline struct thermal_cooling_device *
devm_thermal_of_cooling_device_register(struct device *dev,
--
2.23.0.700.g56cf767bdb-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-16 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 16:40 [PATCH] thermal: update header and documentation Wei Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).