projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b5d8ae
)
hwmon: tmp102: constify pointers to hwmon_channel_info
author
Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org>
Thu, 6 Apr 2023 20:40:20 +0000
(22:40 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:38 +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/tmp102.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/tmp102.c
b/drivers/hwmon/tmp102.c
index 2bf496a62206aed9dcb13e94df15458216b7ab72..e271556efe0b86ece8b71c064953588f49569d36 100644
(file)
--- a/
drivers/hwmon/tmp102.c
+++ b/
drivers/hwmon/tmp102.c
@@
-141,7
+141,7
@@
static umode_t tmp102_is_visible(const void *data, enum hwmon_sensor_types type,
}
}
-static const struct hwmon_channel_info *tmp102_info[] = {
+static const struct hwmon_channel_info *
const
tmp102_info[] = {
HWMON_CHANNEL_INFO(chip,
HWMON_C_REGISTER_TZ),
HWMON_CHANNEL_INFO(temp,