media: staging: fbtft: make const array gamma_par_mask static
authorColin Ian King <colin.king@canonical.com>
Tue, 11 Jul 2017 17:20:02 +0000 (13:20 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 20 Jul 2017 19:06:08 +0000 (15:06 -0400)
Don't populate array gamma_par_mask on the stack but instead make it
static.  Makes the object code smaller by 148 bytes:

Before:
   text    data     bss     dec     hex filename
   2993    1104       0    4097    1001 drivers/staging/fbtft/fb_st7789v.o

After:
   text    data     bss     dec     hex filename
   2757    1192       0    3949     f6d drivers/staging/fbtft/fb_st7789v.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/gspca/xirlink_cit.c
drivers/staging/fbtft/fb_st7789v.c

index b600ea6460d3bc5012435bbb007b5e261e837867..68656e7986c752c982e65fea98d563cb12c7f03e 100644 (file)
@@ -1315,7 +1315,7 @@ static int cit_set_sharpness(struct gspca_dev *gspca_dev, s32 val)
                break;
        case CIT_MODEL1: {
                int i;
-               const unsigned short sa[] = {
+               static const unsigned short sa[] = {
                        0x11, 0x13, 0x16, 0x18, 0x1a, 0x8, 0x0a };
 
                for (i = 0; i < cit_model1_ntries; i++)
index 8935a97ec048872f4d4a624a74127acd359ed19e..a5d7c87557f854024c30095629856f1e62f3bbe7 100644 (file)
@@ -189,7 +189,7 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
         * The masks are the same for both positive and negative voltage
         * gamma curves.
         */
-       const u8 gamma_par_mask[] = {
+       static const u8 gamma_par_mask[] = {
                0xFF, /* V63[3:0], V0[3:0]*/
                0x3F, /* V1[5:0] */
                0x3F, /* V2[5:0] */