projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7165bfc
)
hwmon: adm1177: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:29:57 +0000
(22:29 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:34 +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/adm1177.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/adm1177.c
b/drivers/hwmon/adm1177.c
index be17a26a84f19a142564e2d862d47808aaa49f39..bfe070a1b501c4cfa2384a812e1a404ee0caa9d2 100644
(file)
--- a/
drivers/hwmon/adm1177.c
+++ b/
drivers/hwmon/adm1177.c
@@
-168,7
+168,7
@@
static umode_t adm1177_is_visible(const void *data,
return 0;
}
-static const struct hwmon_channel_info *adm1177_info[] = {
+static const struct hwmon_channel_info *
const
adm1177_info[] = {
HWMON_CHANNEL_INFO(curr,
HWMON_C_INPUT | HWMON_C_MAX_ALARM),
HWMON_CHANNEL_INFO(in,