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

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 54ecb8f7
...@@ -167,7 +167,7 @@ static int multi_reg_write(struct i2c_client *client, ...@@ -167,7 +167,7 @@ static int multi_reg_write(struct i2c_client *client,
static int mt9m001_init(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 * Issue a soft reset. This returns all registers to their
* default values. * default values.
......
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