video: fbdev: make fb_var_screeninfo static, const and __initconst
PATCH 1/1 video: fbdev: make fb_var_screeninfo static, const and __initconst
Make these structures static as they are not referenced in any other file. Make them const as they are used only during a copy operation. Replace __initdata with __initconst in file igafb.c to avoid section conflict error.
---
The changes are not compile tested as I could not find the right architecture to cross compile the files.
drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/igafb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/video/fbdev/dnfb.c +1 -1
@@ -115,7 +115,7 @@ .fb_imageblit = cfb_imageblit, }; -struct fb_var_screeninfo dnfb_var = { +static const struct fb_var_screeninfo dnfb_var = { .xres =1280 , .yres =1024 , .xres_virtual =2048 ,
drivers/video/fbdev/igafb.c +3 -3
@@ -97,7 +97,7 @@ struct fb_var_screeninfo default_var = { };#ifdef CONFIG_SPARC -struct fb_var_screeninfo default_var_1024x768__initdata = { +static const struct fb_var_screeninfo default_var_1024x768__initconst = {/* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */ .xres =1024 , .yres = 768,
@@ -120,7 +120,7 @@ struct fb_var_screeninfo default_var_1024x768 __initdata = { .vmode = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED }; -struct fb_var_screeninfo default_var_1152x900__initdata = { +static const struct fb_var_screeninfo default_var_1152x900__initconst = {/* 1152x900, 76 Hz, Non-Interlaced (110.0 MHz dotclock) */ .xres =1152 , .yres =900 ,
@@ -143,7 +143,7 @@ struct fb_var_screeninfo default_var_1152x900 __initdata = { .vmode = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED }; -struct fb_var_screeninfo default_var_1280x1024__initdata = { +static const struct fb_var_screeninfo default_var_1280x1024__initconst = {/* 1280x1024, 75 Hz, Non-Interlaced (135.00 MHz dotclock) */ .xres =1280 , .yres =1024 ,
Signature · 1 line
1.9.1
[ added dri-devel & sparclinux MLs to cc: ]
Quoted 5 lines · Bhumika Goyal
Make these structures static as they are not referenced in any other file. Make them const as they are used only during a copy operation. Replace
__initdatawith__initconstin fileigafb.cto avoid section conflict error.
Quoted 8 lines
Signed-off-by Bhumika Goyal <[email protected]>---
The changes are not compile tested as I could not find the right architecture to cross compile the files.drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/igafb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
You can deduce such things by looking into Makefile-s and KConfig-s:
- dnfb is used by apollo platform of m68k arch
- igafb can be used on sparc32 arch
I took care of compile testing these changes and discovered that in the current vanilla kernel (v4.14-rc4) igafb fails to build.
Thus I've only queued dnfb changes for v4.15 kernel for now.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics