projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
894fce1
)
hwmon: max127: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:30:30 +0000
(22:30 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:37 +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/max127.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/max127.c
b/drivers/hwmon/max127.c
index 0e21e7e6bbd2e5e690debb0e9bc71c51ce96a46e..49de1d2be2949c3c81e16b47ec1a270e39f423ed 100644
(file)
--- a/
drivers/hwmon/max127.c
+++ b/
drivers/hwmon/max127.c
@@
-285,7
+285,7
@@
static const struct hwmon_ops max127_hwmon_ops = {
.write = max127_write,
};
-static const struct hwmon_channel_info *max127_info[] = {
+static const struct hwmon_channel_info *
const
max127_info[] = {
HWMON_CHANNEL_INFO(in,
HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX,
HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX,