diff mbox series

[1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info

Message ID 20230407150306.80141-1-krzysztof.kozlowski@linaro.org
State Accepted
Headers show
Series [1/4] rtc: ab-eoz9: constify pointers to hwmon_channel_info | expand

Commit Message

Krzysztof Kozlowski April 7, 2023, 3:03 p.m. UTC
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

This depends on hwmon core patch:
https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/

Therefore I propose this should also go via hwmon tree.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
---
 drivers/rtc/rtc-ab-eoz9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni April 27, 2023, 10:42 p.m. UTC | #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
diff mbox series

Patch

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