Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
This depends on hwmon core patch:
https://lore.kernel.org/all/[email protected]/
Therefore I propose this should also go via hwmon tree.
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]
---
drivers/rtc/rtc-ab-eoz9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index 34611f6dedcb..143650cb7822 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -455,7 +455,7 @@ static const struct hwmon_channel_info abeoz9_temp = {
.config = abeoz9_temp_config,
};
-static const struct hwmon_channel_info *abeoz9_info[] = {
+static const struct hwmon_channel_info * const abeoz9_info[] = {
&abeoz9_chip,
&abeoz9_temp,
NULL
--
2.34.1
On Fri, 07 Apr 2023 17:03:03 +0200, Krzysztof Kozlowski wrote:
> Statically allocated array of pointed to hwmon_channel_info can be made
> const for safety.
>
>
Applied, thanks!
[1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info
commit: 4c3f19ce70d7a008953a8d2e9584a20c328699c6
[2/4] rtc: ds3232: constify pointers to hwmon_channel_info
commit: e4133995fe80251ad2abb0261745ea27ab97c2e7
[3/4] rtc: isl12022: constify pointers to hwmon_channel_info
commit: a176de9fffcb97ee885b2ade3dbb23dc9be33b29
[4/4] rtc: rv3032: constify pointers to hwmon_channel_info
commit: eaa9cec95de9405ee7400e8888e6d3d42173df28
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com