Skip to content

Commit fa10b2d

Browse files
ColinIanKingbebarino
authored andcommitted
clk: lmk04832: make read-only const arrays static
Don't populate the read-only const arrays pll2_p and dclk_div_adj on the stack at run time, instead make them static. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240912134707.590224-1-colin.i.king@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent de51711 commit fa10b2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/clk-lmk04832.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static unsigned long lmk04832_vco_recalc_rate(struct clk_hw *hw,
375375
unsigned long prate)
376376
{
377377
struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco);
378-
const unsigned int pll2_p[] = {8, 2, 2, 3, 4, 5, 6, 7};
378+
static const unsigned int pll2_p[] = {8, 2, 2, 3, 4, 5, 6, 7};
379379
unsigned int pll2_n, p, pll2_r;
380380
unsigned int pll2_misc;
381381
unsigned long vco_rate;
@@ -637,7 +637,7 @@ static int lmk04832_register_vco(struct lmk04832 *lmk)
637637

638638
static int lmk04832_clkout_set_ddly(struct lmk04832 *lmk, int id)
639639
{
640-
const int dclk_div_adj[] = {0, 0, -2, -2, 0, 3, -1, 0};
640+
static const int dclk_div_adj[] = {0, 0, -2, -2, 0, 3, -1, 0};
641641
unsigned int sclkx_y_ddly = 10;
642642
unsigned int dclkx_y_ddly;
643643
unsigned int dclkx_y_div;

0 commit comments

Comments
 (0)