diff mbox series

[05/16] hwmon: max1619: Fix type incompatibility with non-macro find_closest

Message ID 20250515081332.151250-6-asoponar@taladin.ro
State New
Headers show
Series lib: Refactor find_closest() and find_closest_descending() from macros to lib functions | 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_descending(). With find_closest_descending() 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/max1619.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c
index 9b6d03cff4df..0bd9fbb2517c 100644
--- a/drivers/hwmon/max1619.c
+++ b/drivers/hwmon/max1619.c
@@ -103,7 +103,7 @@  static int max1619_temp_read(struct regmap *regmap, u32 attr, int channel, long
 	return 0;
 }
 
-static u16 update_intervals[] = { 16000, 8000, 4000, 2000, 1000, 500, 250, 125 };
+static int update_intervals[] = { 16000, 8000, 4000, 2000, 1000, 500, 250, 125 };
 
 static int max1619_chip_read(struct regmap *regmap, u32 attr, long *val)
 {