diff mbox series

[14/16] regulator: max77857: Fix type incompatibility with find_closest()

Message ID 20250515081332.151250-15-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 max77857_switch_freq array was previously declared as unsigned int
but used with find_closest(), which takes signed int parameters. Change
this array from unsigned int to int to maintain type compatibility with
the find_closest() function signature and prevent compilation errors.

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

Patch

diff --git a/drivers/regulator/max77857-regulator.c b/drivers/regulator/max77857-regulator.c
index 1216cc3a6f72..5e64f5510601 100644
--- a/drivers/regulator/max77857-regulator.c
+++ b/drivers/regulator/max77857-regulator.c
@@ -289,7 +289,7 @@  static struct linear_range max77857_lin_ranges[] = {
 	REGULATOR_LINEAR_RANGE(4485000, 0x3D, 0xCC, 73500)
 };
 
-static const unsigned int max77857_switch_freq[] = {
+static const int max77857_switch_freq[] = {
 	1200000, 1500000, 1800000, 2100000
 };