diff mbox series

[07/16] hwmon: ltc4282: Fix type incompatibility with non-macro find_closest

Message ID 20250515081332.151250-8-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 ltc4282_out_rates array was previously declared as unsigned int 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
unsigned int to int to ensure compatibility with the function signature and
prevent compilation errors.

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

Patch

diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
index 4f608a3790fb..1908a998feb1 100644
--- a/drivers/hwmon/ltc4282.c
+++ b/drivers/hwmon/ltc4282.c
@@ -173,7 +173,7 @@  static int ltc4282_set_rate(struct clk_hw *hw,
  * Note the 15HZ conversion rate assumes 12bit ADC which is what we are
  * supporting for now.
  */
-static const unsigned int ltc4282_out_rates[] = {
+static const int ltc4282_out_rates[] = {
 	LTC4282_CLKOUT_CNV, LTC4282_CLKOUT_SYSTEM
 };