From: Colin Ian King Date: Fri, 7 Jul 2017 15:55:19 +0000 (+0100) Subject: iio: accel: make array init_data static to reduce code size X-Git-Tag: v4.14-rc1~148^2~364^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72e36017eee0ffcbcf1630074f122916ed104269;p=platform%2Fkernel%2Flinux-rpi.git 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: Colin Ian King Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/da311.c b/drivers/iio/accel/da311.c index 537cfa8..c0c1620 100644 --- a/drivers/iio/accel/da311.c +++ b/drivers/iio/accel/da311.c @@ -139,7 +139,7 @@ static int da311_register_mask_write(struct i2c_client *client, u16 addr, /* Init sequence taken from the android driver */ static int da311_reset(struct i2c_client *client) { - const struct { + static const struct { u16 addr; u8 mask; u8 data;