Commit c7bc0434 authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab

media: imx7-mipi-csis: make array 'registers' static const, makes object smaller

Don't populate the array 'registers' on the stack but instead make it
static const. Makes the object code smaller by 10 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  20138	   5196	    128	  25462	   6376	staging/media/imx/imx7-mipi-csis.o

After:
   text	   data	    bss	    dec	    hex	filename
  20032	   5292	    128	  25452	   636c	staging/media/imx/imx7-mipi-csis.o

(gcc version 9.2.1, amd64)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 1438d3c1
...@@ -293,7 +293,7 @@ static int mipi_csis_dump_regs(struct csi_state *state) ...@@ -293,7 +293,7 @@ static int mipi_csis_dump_regs(struct csi_state *state)
struct device *dev = &state->pdev->dev; struct device *dev = &state->pdev->dev;
unsigned int i; unsigned int i;
u32 cfg; u32 cfg;
struct { static const struct {
u32 offset; u32 offset;
const char * const name; const char * const name;
} registers[] = { } registers[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment