提交 72e36017 编写于 作者: C Colin Ian King 提交者: Jonathan Cameron

iio: accel: make array init_data static to reduce code size

Making the const array init_data static rather having it on the
stack saves us a couple hundreds of bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   3175	    848	      0	   4023	    fb7	drivers/iio/accel/da311.o

After:
   text	   data	    bss	    dec	    hex	filename
   2860	    936	      0	   3796	    ed4	drivers/iio/accel/da311.o
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 36d311bc
...@@ -139,7 +139,7 @@ static int da311_register_mask_write(struct i2c_client *client, u16 addr, ...@@ -139,7 +139,7 @@ static int da311_register_mask_write(struct i2c_client *client, u16 addr,
/* Init sequence taken from the android driver */ /* Init sequence taken from the android driver */
static int da311_reset(struct i2c_client *client) static int da311_reset(struct i2c_client *client)
{ {
const struct { static const struct {
u16 addr; u16 addr;
u8 mask; u8 mask;
u8 data; u8 data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册