projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11305fd
)
hwmon: mcp3021: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:35:24 +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/mcp3021.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/mcp3021.c
b/drivers/hwmon/mcp3021.c
index e093b19982968122a7e285da795fddae67decc2c..a5f7a294f33d0953f2cd7fb7ffdb4a7118569cc0 100644
(file)
--- a/
drivers/hwmon/mcp3021.c
+++ b/
drivers/hwmon/mcp3021.c
@@
-102,7
+102,7
@@
static umode_t mcp3021_is_visible(const void *_data,
return 0444;
}
-static const struct hwmon_channel_info *mcp3021_info[] = {
+static const struct hwmon_channel_info *
const
mcp3021_info[] = {
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
NULL
};