projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dd50f3
)
hwmon: k8temp: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:30:19 +0000
(22:30 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:36 +0000
(07:08 -0700)
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/k8temp.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/k8temp.c
b/drivers/hwmon/k8temp.c
index f73bd4eceb28f0e46c628b1902b3b2d6d90c0195..2b80ac410cd1b91f75eb23fb9ec6bacbb33fb020 100644
(file)
--- a/
drivers/hwmon/k8temp.c
+++ b/
drivers/hwmon/k8temp.c
@@
-118,7
+118,7
@@
static const struct hwmon_ops k8temp_ops = {
.read = k8temp_read,
};
-static const struct hwmon_channel_info *k8temp_info[] = {
+static const struct hwmon_channel_info *
const
k8temp_info[] = {
HWMON_CHANNEL_INFO(temp,
HWMON_T_INPUT, HWMON_T_INPUT, HWMON_T_INPUT, HWMON_T_INPUT),
NULL