aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-01-19 23:26:30 +0000
committerLee Jones <lee@kernel.org>2024-03-07 08:48:02 +0000
commitd0532248df7111428abd12875c90c34a39a546e4 (patch)
treefc7b5cff8465a4deb0a2654bda96c1dd9584a93d /drivers/leds
parent7eef64da0b0ad8e90409fc4aa80eb69c1b4bdd2c (diff)
downloadlinux-d0532248df7111428abd12875c90c34a39a546e4.tar.gz
leds: aw200xx: Make read-only array coeff_table static const
Don't populate the read-only array coeff_table on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240119232630.2752239-1-colin.i.king@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-aw200xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c
index f584a7f98fc5b8..6c8c9f2c19e339 100644
--- a/drivers/leds/leds-aw200xx.c
+++ b/drivers/leds/leds-aw200xx.c
@@ -282,7 +282,7 @@ static int aw200xx_set_imax(const struct aw200xx *const chip,
u32 led_imax_uA)
{
u32 g_imax_uA = aw200xx_imax_to_global(chip, led_imax_uA);
- u32 coeff_table[] = {1, 2, 3, 4, 6, 8, 12, 16};
+ static const u32 coeff_table[] = {1, 2, 3, 4, 6, 8, 12, 16};
u32 gccr_imax = UINT_MAX;
u32 cur_imax = 0;
int i;