[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515081332.151250-14-asoponar@taladin.ro>
Date: Thu, 15 May 2025 11:13:29 +0300
From: Alexandru Soponar <asoponar@...adin.ro>
To: linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org,
linux-iio@...r.kernel.org,
linux-leds@...r.kernel.org,
linux-watchdog@...r.kernel.org
Cc: jdelvare@...e.com,
linux@...ck-us.net,
jic23@...nel.org,
pavel@....cz,
lee@...nel.org,
baocheng.su@...mens.com,
wim@...ux-watchdog.org,
tobias.schaffner@...mens.com,
angelogioacchino.delregno@...labora.com,
benedikt.niedermayr@...mens.com,
matthias.bgg@...il.com,
aardelean@...libre.com,
contact@...y.one,
Alexandru Soponar <asoponar@...adin.ro>
Subject: [PATCH 13/16] leds: eds-mt6370-rgb: Fix type incompatibility with find_closest()
The common_tfreqs and mt6372_tfreqs arrays were previously declared as
unsigned int but used with find_closest(), which now takes signed int
parameters. Change these arrays 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@...adin.ro>
---
drivers/leds/rgb/leds-mt6370-rgb.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/leds/rgb/leds-mt6370-rgb.c b/drivers/leds/rgb/leds-mt6370-rgb.c
index ebd3ba878dd5..6ce11432dd96 100644
--- a/drivers/leds/rgb/leds-mt6370-rgb.c
+++ b/drivers/leds/rgb/leds-mt6370-rgb.c
@@ -135,7 +135,7 @@ struct mt6370_led {
};
struct mt6370_pdata {
- const unsigned int *tfreq;
+ const int *tfreq;
unsigned int tfreq_len;
u16 reg_rgb1_tr;
s16 reg_rgb_chrind_tr;
@@ -212,11 +212,11 @@ static const struct linear_range mt6372_led_ranges[R_MAX_RANGES] = {
[R_LED_TOFF] = { 250, 0, 15, 500 },
};
-static const unsigned int common_tfreqs[] = {
+static const int common_tfreqs[] = {
10000, 5000, 2000, 1000, 500, 200, 5, 1,
};
-static const unsigned int mt6372_tfreqs[] = {
+static const int mt6372_tfreqs[] = {
8000, 4000, 2000, 1000, 500, 250, 8, 4,
};
@@ -304,7 +304,8 @@ static int mt6370_set_led_freq(struct mt6370_priv *priv, unsigned int led_no, un
const struct mt6370_pdata *pdata = priv->pdata;
enum mt6370_led_field sel_field;
unsigned int tfreq_len = pdata->tfreq_len;
- unsigned int tsum, sel;
+ unsigned int sel;
+ int tsum;
tsum = ton + toff;
--
2.49.0
Powered by blists - more mailing lists