video: fbdev: annotate fb_fix_screeninfo with const and __initconst
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 4 Sep 2017 14:00:49 +0000 (16:00 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 4 Sep 2017 14:00:49 +0000 (16:00 +0200)
Make these const as they are only used during a copy operation.
Some structures are used as a copy operation inside __init functions, so
make them const and replace __initdata with __initconst to avoid section
conflict error.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/68328fb.c
drivers/video/fbdev/atmel_lcdfb.c
drivers/video/fbdev/dnfb.c
drivers/video/fbdev/grvga.c
drivers/video/fbdev/pmag-aa-fb.c
drivers/video/fbdev/pmag-ba-fb.c
drivers/video/fbdev/pmagb-b-fb.c
drivers/video/fbdev/ps3fb.c
drivers/video/fbdev/skeletonfb.c

index c0c6b88d383915fe6e5924bd49434f6a13170278..d48e96088f76fcf90c3b53a628952dcc1e8b90e2 100644 (file)
@@ -72,7 +72,7 @@ static struct fb_var_screeninfo mc68x328fb_default __initdata = {
        .vmode =        FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo mc68x328fb_fix __initdata = {
+static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = {
        .id =           "68328fb",
        .type =         FB_TYPE_PACKED_PIXELS,
        .xpanstep =     1,
index 669ecc755fa9852f97479a5819bc71ca11314c07..e06358da4b99698525fa57d3dcca6666757d23dd 100644 (file)
@@ -320,7 +320,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
        }
 }
 
-static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
+static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
        .type           = FB_TYPE_PACKED_PIXELS,
        .visual         = FB_VISUAL_TRUECOLOR,
        .xpanstep       = 0,
index 3526899da61b93e2c40532b6edb337cc5be53300..7b1492d34e989ab92a1a4819192afc00294af4d7 100644 (file)
@@ -126,7 +126,7 @@ struct fb_var_screeninfo dnfb_var = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo dnfb_fix = {
+static const struct fb_fix_screeninfo dnfb_fix = {
        .id             = "Apollo Mono",
        .smem_start     = (FRAME_BUFFER_START + IO_BASE),
        .smem_len       = FRAME_BUFFER_LEN,
index b471f92969b1bbd5de8c16b592d4ddb18064e5cb..8fc8f46dadeb5c597942773f12c4f97e47bf0c5b 100644 (file)
@@ -70,7 +70,7 @@ static const struct fb_videomode grvga_modedb[] = {
     }
  };
 
-static struct fb_fix_screeninfo grvga_fix = {
+static const struct fb_fix_screeninfo grvga_fix = {
        .id =           "AG SVGACTRL",
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,
index 39922f072db4f89ed5212a8e509cb2e2ca86c2d8..b07ef493316b862ec5b2570a9b56152427c4448c 100644 (file)
@@ -90,7 +90,7 @@ static struct fb_var_screeninfo aafb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo aafb_fix = {
+static const struct fb_fix_screeninfo aafb_fix = {
        .id             = "PMAG-AA",
        .smem_len       = (2048 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index 1fd02f40708eb79740db54a292ca87e8e24cab9c..8d1a878f858663f4832f290a141261e95a84c207 100644 (file)
@@ -67,7 +67,7 @@ static struct fb_var_screeninfo pmagbafb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo pmagbafb_fix = {
+static const struct fb_fix_screeninfo pmagbafb_fix = {
        .id             = "PMAG-BA",
        .smem_len       = (1024 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index 46e96c4515060f0c58ade6ff892f711ad39aa0a6..5ad9b630cf6584c1aa739a911da03d60ec6c39f6 100644 (file)
@@ -57,7 +57,7 @@ static struct fb_var_screeninfo pmagbbfb_defined = {
        .vmode          = FB_VMODE_NONINTERLACED,
 };
 
-static struct fb_fix_screeninfo pmagbbfb_fix = {
+static const struct fb_fix_screeninfo pmagbbfb_fix = {
        .id             = "PMAGB-BA",
        .smem_len       = (2048 * 1024),
        .type           = FB_TYPE_PACKED_PIXELS,
index b269abd932aab586d57ee62b8198dabbdf37ce21..5ed2db39d8236f2896021a190a36bfc4871e206a 100644 (file)
@@ -952,7 +952,7 @@ static struct fb_ops ps3fb_ops = {
        .fb_compat_ioctl = ps3fb_ioctl
 };
 
-static struct fb_fix_screeninfo ps3fb_fix = {
+static const struct fb_fix_screeninfo ps3fb_fix = {
        .id =           DEVICE_NAME,
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_TRUECOLOR,
index 09a1d8cf1965d51b98ed84828eca5cb7fbbe1470..7f4e908330bf0509014612a1fa2a3bf4be1e2e7c 100644 (file)
@@ -84,7 +84,7 @@ struct xxx_par;
  * if we don't use modedb. If we do use modedb see xxxfb_init how to use it
  * to get a fb_var_screeninfo. Otherwise define a default var as well. 
  */
-static struct fb_fix_screeninfo xxxfb_fix = {
+static const struct fb_fix_screeninfo xxxfb_fix = {
        .id =           "FB's name", 
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,