projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb54a54
)
hwmon: nct7904: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:35:26 +0000
(22:35 +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/nct7904.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/nct7904.c
b/drivers/hwmon/nct7904.c
index ecc5db0011a3e40d8e2f3024730371e2a8e14d1a..007bae4c7028f7ead7b099343f854414c4c4c834 100644
(file)
--- a/
drivers/hwmon/nct7904.c
+++ b/
drivers/hwmon/nct7904.c
@@
-803,7
+803,7
@@
static int nct7904_detect(struct i2c_client *client,
return 0;
}
-static const struct hwmon_channel_info *nct7904_info[] = {
+static const struct hwmon_channel_info *
const
nct7904_info[] = {
HWMON_CHANNEL_INFO(in,
/* dummy, skipped in is_visible */
HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX |