]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: fbtft: Make the pointers to s16 init arrays const
authorJoe Perches <joe@perches.com>
Thu, 23 Feb 2017 05:54:56 +0000 (21:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:59 +0000 (09:16 +0100)
This allows making some of the actual arrays const.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-core.c
drivers/staging/fbtft/fbtft.h
drivers/staging/fbtft/flexfb.c

index f54851396fe9922d5f9b6978d857931f530e004f..b89183421cb24d7d606372302d519d46399f0ba7 100644 (file)
@@ -658,7 +658,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
        unsigned int bpp = display->bpp;
        unsigned int fps = display->fps;
        int vmem_size, i;
-       s16 *init_sequence = display->init_sequence;
+       const s16 *init_sequence = display->init_sequence;
        char *gamma = display->gamma;
        u32 *gamma_curves = NULL;
 
index 44cf94d160d4bda994a23fe904b2b39f6df90200..119c3a72be1b05aa23877360f7f3c1187a993c28 100644 (file)
@@ -124,7 +124,7 @@ struct fbtft_display {
        unsigned int bpp;
        unsigned int fps;
        int txbuflen;
-       s16 *init_sequence;
+       const s16 *init_sequence;
        char *gamma;
        int gamma_num;
        int gamma_len;
@@ -228,7 +228,7 @@ struct fbtft_par {
                int led[16];
                int aux[16];
        } gpio;
-       s16 *init_sequence;
+       const s16 *init_sequence;
        struct {
                struct mutex lock;
                u32 *curves;
index af8422e187808efba9482f2e33e4ee28af342cd8..f749c057901f67a865879d85bee62991d3df1cc2 100644 (file)
@@ -63,7 +63,7 @@ static bool latched;
 module_param(latched, bool, 0000);
 MODULE_PARM_DESC(latched, "Use with latched 16-bit databus");
 
-static s16 *initp;
+static const s16 *initp;
 static int initp_num;
 
 /* default init sequences */
@@ -390,7 +390,7 @@ struct flexfb_lcd_controller {
        unsigned int height;
        unsigned int setaddrwin;
        unsigned int regwidth;
-       s16 *init_seq;
+       const s16 *init_seq;
        int init_seq_sz;
 };