diff mbox series

[04/16] hwmon: lm95234: Fix type incompatibility with non-macro find_closest

Message ID 20250515081332.151250-5-asoponar@taladin.ro
State New
Headers show
Series [01/16] hwmon: w83795: Fix type incompatibility with non-macro find_closest | expand

Commit Message

Alexandru Soponar May 15, 2025, 8:13 a.m. UTC
The update_intervals array was previously declared as u16 but used with
find_closest(). With find_closest() now implemented as a function taking
signed int parameters instead of a macro, passing unsigned arrays causes
type incompatibility errors. This patch changes the array type from
u16 to int to ensure compatibility with the function signature and
prevent compilation errors.

Signed-off-by: Alexandru Soponar <asoponar@taladin.ro>
---
 drivers/hwmon/lm95234.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c
index 7da6c8f07332..e808fd7d5587 100644
--- a/drivers/hwmon/lm95234.c
+++ b/drivers/hwmon/lm95234.c
@@ -240,7 +240,7 @@  static int lm95234_temp_read(struct device *dev, u32 attr, int channel, long *va
 	return 0;
 }
 
-static u16 update_intervals[] = { 143, 364, 1000, 2500 };
+static int update_intervals[] = { 143, 364, 1000, 2500 };
 
 static int lm95234_chip_write(struct device *dev, u32 attr, long val)
 {