summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-10-20 17:46:55 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-11-16 12:31:10 +0300
commit57a975565c970d6dd84bc73712857decb5cae8eb (patch)
treecb7ce3c63567fbc24e029661733ac746d6f108ec
parent1342f51ec248324bec6149721e2aac1e4770c794 (diff)
downloadlinux-57a975565c970d6dd84bc73712857decb5cae8eb.tar.xz
media: staging: rkisp1: rsz: make const array static, makes object smaller
Don't populate the const array dev_names on the stack but instead it static. Makes the object code smaller by 15 bytes. Before: text data bss dec hex filename 17091 2648 64 19803 4d5b media/rkisp1/rkisp1-resizer.o After: text data bss dec hex filename 17012 2712 64 19788 4d4c media/rkisp1/rkisp1-resizer.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/rkisp1/rkisp1-resizer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/media/rkisp1/rkisp1-resizer.c b/drivers/staging/media/rkisp1/rkisp1-resizer.c
index 1687d82e6c68..7ca5b47c5bf5 100644
--- a/drivers/staging/media/rkisp1/rkisp1-resizer.c
+++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c
@@ -763,8 +763,10 @@ static void rkisp1_rsz_unregister(struct rkisp1_resizer *rsz)
static int rkisp1_rsz_register(struct rkisp1_resizer *rsz)
{
- const char * const dev_names[] = {RKISP1_RSZ_MP_DEV_NAME,
- RKISP1_RSZ_SP_DEV_NAME};
+ static const char * const dev_names[] = {
+ RKISP1_RSZ_MP_DEV_NAME,
+ RKISP1_RSZ_SP_DEV_NAME
+ };
struct media_pad *pads = rsz->pads;
struct v4l2_subdev *sd = &rsz->sd;
int ret;