Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: geode: remove ifdef OLPC noise

<asm/olpc.h> provides olpc_has_dcon() stub for CONFIG_OLPC=n, compiler
should just optimize the unneeded bits away.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Lubomir Rintel and committed by
Bartlomiej Zolnierkiewicz
1ea673ad 89ef5c6a

+4 -22
+2 -11
drivers/video/fbdev/geode/gxfb_core.c
··· 33 33 #include <linux/pci.h> 34 34 #include <linux/cs5535.h> 35 35 36 + #include <asm/olpc.h> 37 + 36 38 #include "gxfb.h" 37 39 38 40 static char *mode_option; ··· 109 107 FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA }, 110 108 }; 111 109 112 - #ifdef CONFIG_OLPC 113 - #include <asm/olpc.h> 114 - 115 110 static struct fb_videomode gx_dcon_modedb[] = { 116 111 /* The only mode the DCON has is 1200x900 */ 117 112 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, ··· 126 127 *size = ARRAY_SIZE(gx_modedb); 127 128 } 128 129 } 129 - 130 - #else 131 - static void get_modedb(struct fb_videomode **modedb, unsigned int *size) 132 - { 133 - *modedb = (struct fb_videomode *) gx_modedb; 134 - *size = ARRAY_SIZE(gx_modedb); 135 - } 136 - #endif 137 130 138 131 static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) 139 132 {
+2 -11
drivers/video/fbdev/geode/lxfb_core.c
··· 23 23 #include <linux/pci.h> 24 24 #include <linux/uaccess.h> 25 25 26 + #include <asm/olpc.h> 27 + 26 28 #include "lxfb.h" 27 29 28 30 static char *mode_option; ··· 218 216 0, FB_VMODE_NONINTERLACED, 0 }, 219 217 }; 220 218 221 - #ifdef CONFIG_OLPC 222 - #include <asm/olpc.h> 223 - 224 219 static struct fb_videomode olpc_dcon_modedb[] = { 225 220 /* The only mode the DCON has is 1200x900 */ 226 221 { NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3, ··· 235 236 *size = ARRAY_SIZE(geode_modedb); 236 237 } 237 238 } 238 - 239 - #else 240 - static void get_modedb(struct fb_videomode **modedb, unsigned int *size) 241 - { 242 - *modedb = (struct fb_videomode *) geode_modedb; 243 - *size = ARRAY_SIZE(geode_modedb); 244 - } 245 - #endif 246 239 247 240 static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) 248 241 {