diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-09-06 12:08:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2019-11-05 08:29:50 -0300 |
commit | c7bc0434081f034beff22c7b2b179799285b00f2 (patch) | |
tree | de77b07c59809281fdb3d40247ce70b34e80f952 /drivers/staging/media/imx | |
parent | 1438d3c1c35faf16c86dfa6c2a55030777cd4084 (diff) |
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: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx')
-rw-r--r-- | drivers/staging/media/imx/imx7-mipi-csis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 70b830de0ea5..99166afca071 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -293,7 +293,7 @@ static int mipi_csis_dump_regs(struct csi_state *state) struct device *dev = &state->pdev->dev; unsigned int i; u32 cfg; - struct { + static const struct { u32 offset; const char * const name; } registers[] = { |