Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
media: rkisp1: make const arrays ae_wnd_num and hist_wnd_num static
Browse files Browse the repository at this point in the history
Don't populate the const arrays on the stack, instead make them
static. Also makes the object code smaller.

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
  • Loading branch information
ColinIanKing authored and Hans Verkuil committed Nov 4, 2022
1 parent fd3d91a commit a3fb965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ static void rkisp1_aec_config_v12(struct rkisp1_params *params,
u32 exp_ctrl;
u32 block_hsize, block_vsize;
u32 wnd_num_idx = 1;
const u32 ae_wnd_num[] = { 5, 9, 15, 15 };
static const u32 ae_wnd_num[] = { 5, 9, 15, 15 };

/* avoid to override the old enable value */
exp_ctrl = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_EXP_CTRL);
Expand Down Expand Up @@ -822,7 +822,7 @@ static void rkisp1_hst_config_v12(struct rkisp1_params *params,
u32 block_hsize, block_vsize;
u32 wnd_num_idx, hist_weight_num, hist_ctrl, value;
u8 weight15x15[RKISP1_CIF_ISP_HIST_WEIGHT_REG_SIZE_V12];
const u32 hist_wnd_num[] = { 5, 9, 15, 15 };
static const u32 hist_wnd_num[] = { 5, 9, 15, 15 };

/* now we just support 9x9 window */
wnd_num_idx = 1;
Expand Down

0 comments on commit a3fb965

Please sign in to comment.