From: Colin Ian King Date: Thu, 5 Sep 2019 18:05:32 +0000 (-0300) Subject: media: i2c: mt9m001: make array init_regs static, makes object smaller X-Git-Tag: v5.10.7~3807^2^2~359 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36909b552d0ea960732bc1450186f3e738bc41fc;p=platform%2Fkernel%2Flinux-rpi.git media: i2c: mt9m001: make array init_regs static, makes object smaller Don't populate the array init_regs on the stack but instead make it static. Makes the object code smaller by 57 bytes. Before: text data bss dec hex filename 15935 3600 128 19663 4ccf drivers/media/i2c/mt9m001.o After: text data bss dec hex filename 15782 3696 128 19606 4c96 drivers/media/i2c/mt9m001.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index 5613072..210ea76 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -167,7 +167,7 @@ static int multi_reg_write(struct i2c_client *client, static int mt9m001_init(struct i2c_client *client) { - const struct mt9m001_reg init_regs[] = { + static const struct mt9m001_reg init_regs[] = { /* * Issue a soft reset. This returns all registers to their * default values.