* [PATCH] media: i2c: mt9m001: make array init_regs static, makes object smaller
@ 2019-09-05 18:05 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2019-09-05 18:05 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Sakari Ailus, linux-media
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
drivers/media/i2c/mt9m001.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c
index 5613072908ac..210ea76adb53 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.
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-05 18:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 18:05 [PATCH] media: i2c: mt9m001: make array init_regs static, makes object smaller Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).