diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-09-05 14:57:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-07 07:43:14 -0300 |
commit | ed4e15697b5fda94e65af1ecb272cd1388192bd6 (patch) | |
tree | 3d7b8226777a837ff52dacf7ba483d59eebfd640 /drivers/media/dvb-frontends/cxd2820r_t2.c | |
parent | 6f5129e251aeec71f8928ae0668d508454fa8aff (diff) |
media: cxd2820r: make arrays tab static const, makes object smaller
Don't populate the array tab on the stack but instead make it
static const. Makes the object size smaller by 170 bytes in total.
Before:
text data bss dec hex filename
7045 1736 0 8781 224d media/dvb-frontends/cxd2820r_c.o
8800 2216 0 11016 2b08 media/dvb-frontends/cxd2820r_t.o
8981 2120 0 11101 2b5d media/dvb-frontends/cxd2820r_t2.o
After:
text data bss dec hex filename
6896 1832 0 8728 2218 media/dvb-frontends/cxd2820r_c.o
8651 2312 0 10963 2ad3 media/dvb-frontends/cxd2820r_t.o
8853 2184 0 11037 2b1d media/dvb-frontends/cxd2820r_t2.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends/cxd2820r_t2.c')
-rw-r--r-- | drivers/media/dvb-frontends/cxd2820r_t2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/cxd2820r_t2.c b/drivers/media/dvb-frontends/cxd2820r_t2.c index f924a80b968a..34ef2bb2de34 100644 --- a/drivers/media/dvb-frontends/cxd2820r_t2.c +++ b/drivers/media/dvb-frontends/cxd2820r_t2.c @@ -386,7 +386,7 @@ int cxd2820r_sleep_t2(struct dvb_frontend *fe) struct cxd2820r_priv *priv = fe->demodulator_priv; struct i2c_client *client = priv->client[0]; int ret; - struct reg_val_mask tab[] = { + static const struct reg_val_mask tab[] = { { 0x000ff, 0x1f, 0xff }, { 0x00085, 0x00, 0xff }, { 0x00088, 0x01, 0xff }, |