media: fc001[23]: make const gain table arrays static
authorColin Ian King <colin.king@canonical.com>
Tue, 11 Jul 2017 09:43:49 +0000 (05:43 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 19:12:39 +0000 (15:12 -0400)
Don't populate the gain tables on the stack but make them static const.
Makes the object code smaller:

Before:
   text    data     bss     dec     hex filename
   7801    1408       0    9209    23f9 drivers/media/tuners/fc0012.o
   8483     936       0    9419    24cb drivers/media/tuners/fc0013.o

After:
   text    data     bss     dec     hex filename
   7696    1464       0    9160    23c8 drivers/media/tuners/fc0012.o
   8362    1024       0    9386    24aa drivers/media/tuners/fc0013.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/tuners/fc0012.c
drivers/media/tuners/fc0013.c

index dcc323ffbde75a111b089601b8cd50392ddb20e3..625ac6f51c39c04c1b4a51a8e46d71e5340164b4 100644 (file)
@@ -351,7 +351,7 @@ static int fc0012_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
        int ret;
        unsigned char tmp;
        int int_temp, lna_gain, int_lna, tot_agc_gain, power;
-       const int fc0012_lna_gain_table[] = {
+       static const int fc0012_lna_gain_table[] = {
                /* low gain */
                -63, -58, -99, -73,
                -63, -65, -54, -60,
index 91dfa770a5cc76ad90424d5d8354786c0296071a..e606118d1a9be1e9bb778622febb146d5674a32a 100644 (file)
@@ -511,7 +511,7 @@ static int fc0013_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
        int ret;
        unsigned char tmp;
        int int_temp, lna_gain, int_lna, tot_agc_gain, power;
-       const int fc0013_lna_gain_table[] = {
+       static const int fc0013_lna_gain_table[] = {
                /* low gain */
                -63, -58, -99, -73,
                -63, -65, -54, -60,