mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 18:08:20 +00:00
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>
This commit is contained in:
parent
7eef64da0b
commit
d0532248df
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user