lkml.org 
[lkml]   [2000]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.3.x] struct display_switch should be const

This patch changes all occurrencies of `struct display_switch' to `const struct
display_switch', and makes dispsw_data (used for the pseudo palette in
truecolor/directcolor mode) const as well.

Other small updates:
- creatorfb.c: use a temporary since dispsw_data is const now
- tdfxfb.c: move the disabling of the hardware cursor to the initialization
routine since it has to be done only once
- dn_cfb8.c: fix include paths

--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-afb.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-afb.h Sat Oct 14 12:59:15 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_afb;
+extern const struct display_switch fbcon_afb;
extern void fbcon_afb_setup(struct display *p);
extern void fbcon_afb_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb16.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb16.h Sat Oct 14 12:59:17 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb16;
+extern const struct display_switch fbcon_cfb16;
extern void fbcon_cfb16_setup(struct display *p);
extern void fbcon_cfb16_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb2.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb2.h Sat Oct 14 12:59:20 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb2;
+extern const struct display_switch fbcon_cfb2;
extern void fbcon_cfb2_setup(struct display *p);
extern void fbcon_cfb2_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb24.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb24.h Sat Oct 14 12:59:23 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb24;
+extern const struct display_switch fbcon_cfb24;
extern void fbcon_cfb24_setup(struct display *p);
extern void fbcon_cfb24_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb32.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb32.h Sat Oct 14 12:59:26 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb32;
+extern const struct display_switch fbcon_cfb32;
extern void fbcon_cfb32_setup(struct display *p);
extern void fbcon_cfb32_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb4.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb4.h Sat Oct 14 12:59:29 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb4;
+extern const struct display_switch fbcon_cfb4;
extern void fbcon_cfb4_setup(struct display *p);
extern void fbcon_cfb4_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb8.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-cfb8.h Sat Oct 14 12:59:32 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_cfb8;
+extern const struct display_switch fbcon_cfb8;
extern void fbcon_cfb8_setup(struct display *p);
extern void fbcon_cfb8_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-hga.h Mon Jul 17 15:25:49 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-hga.h Sat Oct 14 13:00:03 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_hga;
+extern const struct display_switch fbcon_hga;
extern void fbcon_hga_setup(struct display *p);
extern void fbcon_hga_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-ilbm.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-ilbm.h Sat Oct 14 12:59:35 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_ilbm;
+extern const struct display_switch fbcon_ilbm;
extern void fbcon_ilbm_setup(struct display *p);
extern void fbcon_ilbm_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p2.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p2.h Sat Oct 14 12:59:37 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_iplan2p2;
+extern const struct display_switch fbcon_iplan2p2;
extern void fbcon_iplan2p2_setup(struct display *p);
extern void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p4.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p4.h Sat Oct 14 12:59:41 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_iplan2p4;
+extern const struct display_switch fbcon_iplan2p4;
extern void fbcon_iplan2p4_setup(struct display *p);
extern void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p8.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-iplan2p8.h Sat Oct 14 12:59:45 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_iplan2p8;
+extern const struct display_switch fbcon_iplan2p8;
extern void fbcon_iplan2p8_setup(struct display *p);
extern void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy,
int dx, int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-mac.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-mac.h Sat Oct 14 12:59:48 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_mac;
+extern const struct display_switch fbcon_mac;
extern void fbcon_mac_setup(struct display *p);
extern void fbcon_mac_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-mfb.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-mfb.h Sat Oct 14 12:59:51 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_mfb;
+extern const struct display_switch fbcon_mfb;
extern void fbcon_mfb_setup(struct display *p);
extern void fbcon_mfb_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-vga-planes.h Mon Jul 17 14:34:22 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-vga-planes.h Sat Oct 14 12:59:56 2000
@@ -17,8 +17,8 @@
#endif
#endif

-extern struct display_switch fbcon_vga_planes;
-extern struct display_switch fbcon_ega_planes;
+extern const struct display_switch fbcon_vga_planes;
+extern const struct display_switch fbcon_ega_planes;
extern void fbcon_vga_planes_setup(struct display *p);
extern void fbcon_vga_planes_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-vga.h Wed Sep 30 06:04:37 1998
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon-vga.h Sat Oct 14 12:59:53 2000
@@ -17,7 +17,7 @@
#endif
#endif

-extern struct display_switch fbcon_vga;
+extern const struct display_switch fbcon_vga;
extern void fbcon_vga_setup(struct display *p);
extern void fbcon_vga_bmove(struct display *p, int sy, int sx, int dy, int dx,
int height, int width);
--- linux-const-dispsw-2.4.0-test10-pre2/include/video/fbcon.h Fri Aug 11 13:53:29 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/include/video/fbcon.h Sat Oct 14 13:01:42 2000
@@ -42,7 +42,7 @@
unsigned int fontwidthmask; /* 1 at (1 << (width - 1)) if width is supported */
};

-extern struct display_switch fbcon_dummy;
+extern const struct display_switch fbcon_dummy;

/*
* This is the interface between the low-level console driver and the
@@ -65,8 +65,8 @@
u_long line_length; /* length of a line in bytes */
u_short can_soft_blank; /* zero if no hardware blanking */
u_short inverse; /* != 0 text black on white as default */
- struct display_switch *dispsw; /* low level operations */
- void *dispsw_data; /* optional dispsw helper data */
+ const struct display_switch *dispsw; /* low level operations */
+ const void *dispsw_data; /* optional dispsw helper data */

#if 0
struct fb_fix_cursorinfo fcrsr;
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/matrox/matroxfb_accel.c Sun Aug 13 17:40:28 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/matrox/matroxfb_accel.c Sat Oct 14 15:17:28 2000
@@ -1041,7 +1041,7 @@
#define matrox_cfb24_putcs matrox_cfb32_putcs

#ifdef FBCON_HAS_VGATEXT
-static struct display_switch matroxfb_text = {
+static const struct display_switch matroxfb_text = {
setup: matrox_text_setup,
bmove: matrox_text_bmove,
clear: matrox_text_clear,
@@ -1055,7 +1055,7 @@
#endif

#ifdef FBCON_HAS_CFB4
-static struct display_switch matroxfb_cfb4 = {
+static const struct display_switch matroxfb_cfb4 = {
setup: fbcon_cfb4_setup,
bmove: matrox_cfb4_bmove,
clear: matrox_cfb4_clear,
@@ -1067,7 +1067,7 @@
#endif

#ifdef FBCON_HAS_CFB8
-static struct display_switch matroxfb_cfb8 = {
+static const struct display_switch matroxfb_cfb8 = {
setup: fbcon_cfb8_setup,
bmove: matrox_cfbX_bmove,
clear: matrox_cfb8_clear,
@@ -1080,7 +1080,7 @@
#endif

#ifdef FBCON_HAS_CFB16
-static struct display_switch matroxfb_cfb16 = {
+static const struct display_switch matroxfb_cfb16 = {
setup: fbcon_cfb16_setup,
bmove: matrox_cfbX_bmove,
clear: matrox_cfb16_clear,
@@ -1093,7 +1093,7 @@
#endif

#ifdef FBCON_HAS_CFB24
-static struct display_switch matroxfb_cfb24 = {
+static const struct display_switch matroxfb_cfb24 = {
setup: fbcon_cfb24_setup,
bmove: matrox_cfbX_bmove,
clear: matrox_cfb24_clear,
@@ -1106,7 +1106,7 @@
#endif

#ifdef FBCON_HAS_CFB32
-static struct display_switch matroxfb_cfb32 = {
+static const struct display_switch matroxfb_cfb32 = {
setup: fbcon_cfb32_setup,
bmove: matrox_cfbX_bmove,
clear: matrox_cfb32_clear,
@@ -1119,7 +1119,7 @@
#endif

void initMatrox(WPMINFO struct display* p) {
- struct display_switch *swtmp;
+ const struct display_switch *swtmp;

DBG("initMatrox")

--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/S3triofb.c Sat Aug 5 14:20:03 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/S3triofb.c Sat Oct 14 15:11:51 2000
@@ -109,7 +109,7 @@
*/

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_trio8;
+static const struct display_switch fbcon_trio8;
#endif

/*
@@ -849,7 +849,7 @@
fbcon_cfb8_revc(p, xx, yy);
}

-static struct display_switch fbcon_trio8 = {
+static const struct display_switch fbcon_trio8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_trio8_bmove,
clear: fbcon_trio8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/aty128fb.c Sun Sep 17 20:04:17 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/aty128fb.c Sat Oct 14 15:12:14 2000
@@ -380,7 +380,7 @@
static u32 bpp_to_depth(u32 bpp);

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_aty128_8;
+static const struct display_switch fbcon_aty128_8;
static void fbcon_aty8_putc(struct vc_data *conp, struct display *p,
int c, int yy, int xx);
static void fbcon_aty8_putcs(struct vc_data *conp, struct display *p,
@@ -388,7 +388,7 @@
int yy, int xx);
#endif
#ifdef FBCON_HAS_CFB16
-static struct display_switch fbcon_aty128_16;
+static const struct display_switch fbcon_aty128_16;
static void fbcon_aty16_putc(struct vc_data *conp, struct display *p,
int c, int yy, int xx);
static void fbcon_aty16_putcs(struct vc_data *conp, struct display *p,
@@ -396,7 +396,7 @@
int yy, int xx);
#endif
#ifdef FBCON_HAS_CFB24
-static struct display_switch fbcon_aty128_24;
+static const struct display_switch fbcon_aty128_24;
static void fbcon_aty24_putc(struct vc_data *conp, struct display *p,
int c, int yy, int xx);
static void fbcon_aty24_putcs(struct vc_data *conp, struct display *p,
@@ -404,7 +404,7 @@
int yy, int xx);
#endif
#ifdef FBCON_HAS_CFB32
-static struct display_switch fbcon_aty128_32;
+static const struct display_switch fbcon_aty128_32;
static void fbcon_aty32_putc(struct vc_data *conp, struct display *p,
int c, int yy, int xx);
static void fbcon_aty32_putcs(struct vc_data *conp, struct display *p,
@@ -2444,7 +2444,7 @@
fbcon_cfb8_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty128_8 = {
+static const struct display_switch fbcon_aty128_8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_aty128_bmove,
clear: fbcon_cfb8_clear,
@@ -2492,7 +2492,7 @@
fbcon_cfb16_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty128_16 = {
+static const struct display_switch fbcon_aty128_16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_aty128_bmove,
clear: fbcon_cfb16_clear,
@@ -2540,7 +2540,7 @@
fbcon_cfb24_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty128_24 = {
+static const struct display_switch fbcon_aty128_24 = {
setup: fbcon_cfb24_setup,
bmove: fbcon_aty128_bmove,
clear: fbcon_cfb24_clear,
@@ -2588,7 +2588,7 @@
fbcon_cfb32_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty128_32 = {
+static const struct display_switch fbcon_aty128_32 = {
setup: fbcon_cfb32_setup,
bmove: fbcon_aty128_bmove,
clear: fbcon_cfb32_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/atyfb.c Sun Sep 17 20:04:17 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/atyfb.c Sat Oct 14 15:12:29 2000
@@ -347,7 +347,7 @@
static void fbcon_aty_clear(struct vc_data *conp, struct display *p, int sy,
int sx, int height, int width);
#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_aty8;
+static const struct display_switch fbcon_aty8;
static void fbcon_aty8_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
static void fbcon_aty8_putcs(struct vc_data *conp, struct display *p,
@@ -355,7 +355,7 @@
int xx);
#endif
#ifdef FBCON_HAS_CFB16
-static struct display_switch fbcon_aty16;
+static const struct display_switch fbcon_aty16;
static void fbcon_aty16_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
static void fbcon_aty16_putcs(struct vc_data *conp, struct display *p,
@@ -363,7 +363,7 @@
int xx);
#endif
#ifdef FBCON_HAS_CFB24
-static struct display_switch fbcon_aty24;
+static const struct display_switch fbcon_aty24;
static void fbcon_aty24_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
static void fbcon_aty24_putcs(struct vc_data *conp, struct display *p,
@@ -371,7 +371,7 @@
int xx);
#endif
#ifdef FBCON_HAS_CFB32
-static struct display_switch fbcon_aty32;
+static const struct display_switch fbcon_aty32;
static void fbcon_aty32_putc(struct vc_data *conp, struct display *p, int c,
int yy, int xx);
static void fbcon_aty32_putcs(struct vc_data *conp, struct display *p,
@@ -4611,7 +4611,7 @@
fbcon_cfb8_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty8 = {
+static const struct display_switch fbcon_aty8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_aty_bmove,
clear: fbcon_aty_clear,
@@ -4673,7 +4673,7 @@
fbcon_cfb16_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty16 = {
+static const struct display_switch fbcon_aty16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_aty_bmove,
clear: fbcon_aty_clear,
@@ -4735,7 +4735,7 @@
fbcon_cfb24_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty24 = {
+static const struct display_switch fbcon_aty24 = {
setup: fbcon_cfb24_setup,
bmove: fbcon_aty_bmove,
clear: fbcon_aty_clear,
@@ -4797,7 +4797,7 @@
fbcon_cfb32_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_aty32 = {
+static const struct display_switch fbcon_aty32 = {
setup: fbcon_cfb32_setup,
bmove: fbcon_aty_bmove,
clear: fbcon_aty_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/cgsixfb.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/cgsixfb.c Sat Oct 14 15:12:37 2000
@@ -516,7 +516,7 @@
spin_unlock_irqrestore(&fb->lock, flags);
}

-static struct display_switch cg6_dispsw __initdata = {
+static const struct display_switch cg6_dispsw __initdata = {
setup: cg6_setup,
bmove: fbcon_redraw_bmove,
clear: cg6_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/clgenfb.c Sat Aug 5 14:20:03 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/clgenfb.c Sat Oct 14 15:12:43 2000
@@ -530,7 +530,7 @@
static void fbcon_clgen8_clear (struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);

-static struct display_switch fbcon_clgen_8 = {
+static const struct display_switch fbcon_clgen_8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_clgen8_bmove,
clear: fbcon_clgen8_clear,
@@ -546,7 +546,7 @@
int dy, int dx, int height, int width);
static void fbcon_clgen16_clear (struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);
-static struct display_switch fbcon_clgen_16 = {
+static const struct display_switch fbcon_clgen_16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_clgen16_bmove,
clear: fbcon_clgen16_clear,
@@ -562,7 +562,7 @@
int dy, int dx, int height, int width);
static void fbcon_clgen32_clear (struct vc_data *conp, struct display *p,
int sy, int sx, int height, int width);
-static struct display_switch fbcon_clgen_32 = {
+static const struct display_switch fbcon_clgen_32 = {
setup: fbcon_cfb32_setup,
bmove: fbcon_clgen32_bmove,
clear: fbcon_clgen32_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/controlfb.c Sun Sep 17 20:04:17 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/controlfb.c Sat Oct 14 15:12:48 2000
@@ -1141,7 +1141,7 @@
}
}

-static struct display_switch control_cfb16 = {
+static const struct display_switch control_cfb16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_cfb16_bmove,
clear: fbcon_cfb16_clear,
@@ -1152,7 +1152,7 @@
fontwidthmask: FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
};

-static struct display_switch control_cfb32 = {
+static const struct display_switch control_cfb32 = {
setup: fbcon_cfb32_setup,
bmove: fbcon_cfb32_bmove,
clear: fbcon_cfb32_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/creatorfb.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/creatorfb.c Sat Oct 14 15:35:38 2000
@@ -625,7 +625,7 @@
spin_unlock_irqrestore(&fb->lock, flags);
}

-static struct display_switch ffb_dispsw __initdata = {
+static const struct display_switch ffb_dispsw __initdata = {
setup: ffb_setup,
bmove: fbcon_redraw_bmove,
clear: ffb_clear,
@@ -762,14 +762,16 @@
unsigned int btype;
char name[64];
struct fb_ops *fbops;
+ void *pseudo_palette;

if (prom_getproperty(fb->prom_node, "reg", (void *) regs, sizeof(regs)) <= 0)
return NULL;

- disp->dispsw_data = (void *)kmalloc(16 * sizeof(u32), GFP_KERNEL);
- if (disp->dispsw_data == NULL)
+ pseudo_palette = (void *)kmalloc(16 * sizeof(u32), GFP_KERNEL);
+ if (pseudo_palette == NULL)
return NULL;
- memset(disp->dispsw_data, 0, 16 * sizeof(u32));
+ memset(pseudo_palette, 0, 16 * sizeof(u32));
+ disp->dispsw_data = pseudo_palette;

fbops = kmalloc(sizeof(*fbops), GFP_KERNEL);
if (fbops == NULL) {
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/cyber2000fb.c Wed Sep 20 13:19:54 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/cyber2000fb.c Sat Oct 14 15:13:08 2000
@@ -68,7 +68,7 @@

struct cfb_info {
struct fb_info fb;
- struct display_switch *dispsw;
+ const struct display_switch *dispsw;
struct pci_dev *dev;
signed int currcon;
int func_use_count;
@@ -249,7 +249,7 @@
cfb->dispsw->clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_cyber_accel = {
+static const struct display_switch fbcon_cyber_accel = {
setup: cyber2000_accel_setup,
bmove: cyber2000_accel_bmove,
clear: cyber2000_accel_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/cyberfb.c Mon Aug 7 15:46:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/cyberfb.c Sat Oct 14 15:13:52 2000
@@ -266,7 +266,7 @@
*/

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_cyber8;
+static const struct display_switch fbcon_cyber8;
#endif

/*
@@ -1240,7 +1240,7 @@
DPRINTK("EXIT\n");
}

-static struct display_switch fbcon_cyber8 = {
+static const struct display_switch fbcon_cyber8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_cyber8_bmove,
clear: fbcon_cyber8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/dn_cfb4.c Mon Aug 7 15:46:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/dn_cfb4.c Sat Oct 14 15:14:17 2000
@@ -151,7 +151,7 @@
/* accel stuff */
#define USE_DN_ACCEL

-static struct display_switch dispsw_apollofb;
+static const struct display_switch dispsw_apollofb;

static int dn_fb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info) {
@@ -496,7 +496,7 @@
fbcon_mfb_revc(p,xx,yy);
}

-static struct display_switch dispsw_apollofb = {
+static const struct display_switch dispsw_apollofb = {
setup: fbcon_mfb_setup,
bmove: bmove_apollofb,
clear: clear_apollofb,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/dn_cfb8.c Mon Aug 7 15:46:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/dn_cfb8.c Sat Oct 14 15:48:21 2000
@@ -15,9 +15,9 @@
#include <asm/apollohw.h>
#include <linux/fb.h>
#include <linux/module.h>
+#include <video/fbcon.h>
+#include <video/fbcon-mfb.h>
#include "dn_accel.h"
-#include "fbcon.h"
-#include "fbcon-mfb.h"

/* apollo video HW definitions */

@@ -152,7 +152,7 @@
/* accel stuff */
#define USE_DN_ACCEL

-static struct display_switch dispsw_apollofb;
+static const struct display_switch dispsw_apollofb;

static int dn_fb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info) {
@@ -544,7 +544,7 @@
*dest = ~*dest;
}

-static struct display_switch dispsw_apollofb = {
+static const struct display_switch dispsw_apollofb = {
setup: fbcon_mfb_setup,
bmove: bmove_apollofb,
clear: clear_apollofb,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/dnfb.c Mon Aug 7 15:46:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/dnfb.c Sat Oct 14 15:14:28 2000
@@ -157,7 +157,7 @@
/* accel stuff */
#define USE_DN_ACCEL

-static struct display_switch dispsw_apollofb;
+static const struct display_switch dispsw_apollofb;

static int dn_fb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info) {
@@ -500,7 +500,7 @@
fbcon_mfb_revc(p,xx,yy);
}

-static struct display_switch dispsw_apollofb = {
+static const struct display_switch dispsw_apollofb = {
setup: fbcon_mfb_setup,
bmove: bmove_apollofb,
clear: clear_apollofb,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-afb.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-afb.c Sat Oct 14 15:14:46 2000
@@ -410,7 +410,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_afb = {
+const struct display_switch fbcon_afb = {
setup: fbcon_afb_setup,
bmove: fbcon_afb_bmove,
clear: fbcon_afb_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb16.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb16.c Sat Oct 14 12:23:18 2000
@@ -279,7 +279,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb16 = {
+const struct display_switch fbcon_cfb16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_cfb16_bmove,
clear: fbcon_cfb16_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb2.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb2.c Sat Oct 14 12:23:36 2000
@@ -189,7 +189,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb2 = {
+const struct display_switch fbcon_cfb2 = {
setup: fbcon_cfb2_setup,
bmove: fbcon_cfb2_bmove,
clear: fbcon_cfb2_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb24.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb24.c Sat Oct 14 12:23:42 2000
@@ -291,7 +291,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb24 = {
+const struct display_switch fbcon_cfb24 = {
setup: fbcon_cfb24_setup,
bmove: fbcon_cfb24_bmove,
clear: fbcon_cfb24_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb32.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb32.c Sat Oct 14 12:23:45 2000
@@ -265,7 +265,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb32 = {
+const struct display_switch fbcon_cfb32 = {
setup: fbcon_cfb32_setup,
bmove: fbcon_cfb32_bmove,
clear: fbcon_cfb32_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb4.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb4.c Sat Oct 14 12:23:39 2000
@@ -193,7 +193,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb4 = {
+const struct display_switch fbcon_cfb4 = {
setup: fbcon_cfb4_setup,
bmove: fbcon_cfb4_bmove,
clear: fbcon_cfb4_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb8.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-cfb8.c Sat Oct 14 12:23:21 2000
@@ -255,7 +255,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_cfb8 = {
+const struct display_switch fbcon_cfb8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_cfb8_bmove,
clear: fbcon_cfb8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-hga.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-hga.c Sat Oct 14 12:24:00 2000
@@ -212,7 +212,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_hga = {
+const struct display_switch fbcon_hga = {
setup: fbcon_hga_setup,
bmove: fbcon_hga_bmove,
clear: fbcon_hga_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-ilbm.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-ilbm.c Sat Oct 14 12:23:23 2000
@@ -258,7 +258,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_ilbm = {
+const struct display_switch fbcon_ilbm = {
setup: fbcon_ilbm_setup,
bmove: fbcon_ilbm_bmove,
clear: fbcon_ilbm_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p2.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p2.c Sat Oct 14 12:23:26 2000
@@ -437,7 +437,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_iplan2p2 = {
+const struct display_switch fbcon_iplan2p2 = {
setup: fbcon_iplan2p2_setup,
bmove: fbcon_iplan2p2_bmove,
clear: fbcon_iplan2p2_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p4.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p4.c Sat Oct 14 12:23:29 2000
@@ -457,7 +457,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_iplan2p4 = {
+const struct display_switch fbcon_iplan2p4 = {
setup: fbcon_iplan2p4_setup,
bmove: fbcon_iplan2p4_bmove,
clear: fbcon_iplan2p4_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p8.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-iplan2p8.c Sat Oct 14 12:23:31 2000
@@ -494,7 +494,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_iplan2p8 = {
+const struct display_switch fbcon_iplan2p8 = {
setup: fbcon_iplan2p8_setup,
bmove: fbcon_iplan2p8_bmove,
clear: fbcon_iplan2p8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-mac.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-mac.c Sat Oct 14 12:23:47 2000
@@ -446,7 +446,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_mac = {
+const struct display_switch fbcon_mac = {
setup: fbcon_mac_setup,
bmove: fbcon_redraw_bmove,
clear: fbcon_redraw_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-mfb.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-mfb.c Sat Oct 14 12:23:34 2000
@@ -177,7 +177,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_mfb = {
+const struct display_switch fbcon_mfb = {
setup: fbcon_mfb_setup,
bmove: fbcon_mfb_bmove,
clear: fbcon_mfb_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-vga-planes.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-vga-planes.c Sat Oct 14 13:24:16 2000
@@ -326,7 +326,7 @@
}
}

-struct display_switch fbcon_vga_planes = {
+const struct display_switch fbcon_vga_planes = {
setup: fbcon_vga_planes_setup,
bmove: fbcon_vga_planes_bmove,
clear: fbcon_vga_planes_clear,
@@ -336,7 +336,7 @@
fontwidthmask: FONTWIDTH(8)
};

-struct display_switch fbcon_ega_planes = {
+const struct display_switch fbcon_ega_planes = {
setup: fbcon_vga_planes_setup,
bmove: fbcon_vga_planes_bmove,
clear: fbcon_vga_planes_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-vga.c Fri Jul 28 21:19:18 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon-vga.c Sat Oct 14 12:23:49 2000
@@ -176,7 +176,7 @@
* `switch' for the low level operations
*/

-struct display_switch fbcon_vga = {
+const struct display_switch fbcon_vga = {
setup: fbcon_vga_setup,
bmove: fbcon_vga_bmove,
clear: fbcon_vga_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon.c Wed Oct 4 19:53:25 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/fbcon.c Sat Oct 14 15:16:18 2000
@@ -333,7 +333,7 @@
* Low Level Operations
*/

-struct display_switch fbcon_dummy;
+const struct display_switch fbcon_dummy;

/* NOTE: fbcon cannot be __init: it may be called from take_over_console later */

@@ -2414,7 +2414,7 @@

#define DUMMY (void *)fbcon_dummy_op

-struct display_switch fbcon_dummy = {
+const struct display_switch fbcon_dummy = {
setup: DUMMY,
bmove: DUMMY,
clear: DUMMY,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/g364fb.c Fri Jul 28 21:19:19 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/g364fb.c Sat Oct 14 15:16:30 2000
@@ -151,7 +151,7 @@
}


-static struct display_switch fbcon_g364cfb8 = {
+static const struct display_switch fbcon_g364cfb8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_cfb8_bmove,
clear: fbcon_cfb8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/igafb.c Fri Jul 28 21:19:19 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/igafb.c Sat Oct 14 15:16:45 2000
@@ -450,7 +450,7 @@
{
struct fb_fix_screeninfo fix;
struct display *display;
- struct display_switch *sw;
+ const struct display_switch *sw;

if (con >= 0)
display = &fb_display[con];
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/imsttfb.c Sat Aug 5 14:20:03 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/imsttfb.c Sat Oct 14 15:16:55 2000
@@ -1115,7 +1115,7 @@
}

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_imstt8 = {
+static const struct display_switch fbcon_imstt8 = {
setup: fbcon_cfb8_setup,
bmove: imsttfbcon_bmove,
clear: imsttfbcon_clear,
@@ -1129,7 +1129,7 @@
};
#endif
#ifdef FBCON_HAS_CFB16
-static struct display_switch fbcon_imstt16 = {
+static const struct display_switch fbcon_imstt16 = {
setup: fbcon_cfb16_setup,
bmove: imsttfbcon_bmove,
clear: imsttfbcon_clear,
@@ -1143,7 +1143,7 @@
};
#endif
#ifdef FBCON_HAS_CFB24
-static struct display_switch fbcon_imstt24 = {
+static const struct display_switch fbcon_imstt24 = {
setup: fbcon_cfb24_setup,
bmove: imsttfbcon_bmove,
clear: imsttfbcon_clear,
@@ -1157,7 +1157,7 @@
};
#endif
#ifdef FBCON_HAS_CFB32
-static struct display_switch fbcon_imstt32 = {
+static const struct display_switch fbcon_imstt32 = {
setup: fbcon_cfb32_setup,
bmove: imsttfbcon_bmove,
clear: imsttfbcon_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/leofb.c Fri Jul 28 21:19:19 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/leofb.c Sat Oct 14 15:16:59 2000
@@ -448,7 +448,7 @@
spin_unlock_irqrestore(&fb->lock, flags);
}

-static struct display_switch leo_dispsw __initdata = {
+static const struct display_switch leo_dispsw __initdata = {
setup: leo_setup,
bmove: fbcon_redraw_bmove,
clear: leo_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/pm2fb.c Fri Jul 28 21:19:20 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/pm2fb.c Sat Oct 14 15:17:51 2000
@@ -1280,7 +1280,7 @@
0, p->var.yoffset+sy, sx, p->var.yres-sy, c);
}

-static struct display_switch pm2_cfb8 = {
+static const struct display_switch pm2_cfb8 = {
setup: fbcon_cfb8_setup,
bmove: pm2fb_pp_bmove,
#ifdef __alpha__
@@ -1333,7 +1333,7 @@
0, p->var.yoffset+sy, sx, p->var.yres-sy, c);
}

-static struct display_switch pm2_cfb16 = {
+static const struct display_switch pm2_cfb16 = {
setup: fbcon_cfb16_setup,
bmove: pm2fb_pp_bmove,
clear: pm2fb_clear16,
@@ -1397,7 +1397,7 @@

}

-static struct display_switch pm2_cfb24 = {
+static const struct display_switch pm2_cfb24 = {
setup: fbcon_cfb24_setup,
bmove: pm2fb_bmove,
clear: pm2fb_clear24,
@@ -1441,7 +1441,7 @@
0, p->var.yoffset+sy, sx, p->var.yres-sy, c);
}

-static struct display_switch pm2_cfb32 = {
+static const struct display_switch pm2_cfb32 = {
setup: fbcon_cfb32_setup,
bmove: pm2fb_bmove,
clear: pm2fb_clear32,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/retz3fb.c Fri Jul 28 21:19:20 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/retz3fb.c Sat Oct 14 15:17:57 2000
@@ -294,7 +294,7 @@
*/

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_retz3_8;
+static const struct display_switch fbcon_retz3_8;
#endif


@@ -1636,7 +1636,7 @@
}


-static struct display_switch fbcon_retz3_8 = {
+static const struct display_switch fbcon_retz3_8 = {
setup: fbcon_cfb8_setup,
bmove: retz3_8_bmove,
clear: retz3_8_clear,
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/sisfb.c Wed Sep 20 13:19:54 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/sisfb.c Sat Oct 14 15:39:24 2000
@@ -789,7 +789,7 @@
{
struct fb_fix_screeninfo fix;
struct display *display;
- struct display_switch *sw;
+ const struct display_switch *sw;
u32 flags;

if (con >= 0)
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/tdfxfb.c Fri Jul 28 21:19:20 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/tdfxfb.c Sat Oct 14 17:05:59 2000
@@ -1181,8 +1181,9 @@
spin_unlock_irqrestore(&info->DAClock,flags);
return;
}
+
#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_banshee8 = {
+static const struct display_switch fbcon_banshee8 = {
setup: fbcon_cfb8_setup,
bmove: tdfx_cfbX_bmove,
clear: tdfx_cfb8_clear,
@@ -1195,7 +1196,7 @@
};
#endif
#ifdef FBCON_HAS_CFB16
-static struct display_switch fbcon_banshee16 = {
+static const struct display_switch fbcon_banshee16 = {
setup: fbcon_cfb16_setup,
bmove: tdfx_cfbX_bmove,
clear: tdfx_cfb16_clear,
@@ -1208,7 +1209,7 @@
};
#endif
#ifdef FBCON_HAS_CFB24
-static struct display_switch fbcon_banshee24 = {
+static const struct display_switch fbcon_banshee24 = {
setup: fbcon_cfb24_setup,
bmove: tdfx_cfbX_bmove,
clear: tdfx_cfb24_clear,
@@ -1221,7 +1222,7 @@
};
#endif
#ifdef FBCON_HAS_CFB32
-static struct display_switch fbcon_banshee32 = {
+static const struct display_switch fbcon_banshee32 = {
setup: fbcon_cfb32_setup,
bmove: tdfx_cfbX_bmove,
clear: tdfx_cfb32_clear,
@@ -1652,7 +1653,6 @@
case 8:
info->dispsw = noaccel ? fbcon_cfb8 : fbcon_banshee8;
disp->dispsw = &info->dispsw;
- if (nohwcursor) fbcon_banshee8.cursor = NULL;
break;
#endif
#ifdef FBCON_HAS_CFB16
@@ -1660,7 +1660,6 @@
info->dispsw = noaccel ? fbcon_cfb16 : fbcon_banshee16;
disp->dispsw = &info->dispsw;
disp->dispsw_data = info->fbcon_cmap.cfb16;
- if (nohwcursor) fbcon_banshee16.cursor = NULL;
break;
#endif
#ifdef FBCON_HAS_CFB24
@@ -1668,7 +1667,6 @@
info->dispsw = noaccel ? fbcon_cfb24 : fbcon_banshee24;
disp->dispsw = &info->dispsw;
disp->dispsw_data = info->fbcon_cmap.cfb24;
- if (nohwcursor) fbcon_banshee24.cursor = NULL;
break;
#endif
#ifdef FBCON_HAS_CFB32
@@ -1676,7 +1674,6 @@
info->dispsw = noaccel ? fbcon_cfb32 : fbcon_banshee32;
disp->dispsw = &info->dispsw;
disp->dispsw_data = info->fbcon_cmap.cfb32;
- if (nohwcursor) fbcon_banshee32.cursor = NULL;
break;
#endif
default:
@@ -1903,7 +1900,26 @@
/* clear framebuffer memory */
memset_io(fb_info.bufbase_virt, 0, fb_info.bufbase_size);
currcon = -1;
- if (!nohwcursor) tdfxfb_hwcursor_init();
+ if (!nohwcursor) {
+ tdfxfb_hwcursor_init();
+ } else {
+ /*
+ * It doesn't harm to modify fbcon_banshee*, since fbcon_banshee* and
+ * nohwcursor are shared among boards
+ */
+#ifdef FBCON_HAS_CFB8
+ ((struct display_switch *)&fbcon_banshee8)->cursor = NULL;
+#endif
+#ifdef FBCON_HAS_CFB16
+ ((struct display_switch *)&fbcon_banshee16)->cursor = NULL;
+#endif
+#ifdef FBCON_HAS_CFB24
+ ((struct display_switch *)&fbcon_banshee24)->cursor = NULL;
+#endif
+#ifdef FBCON_HAS_CFB32
+ ((struct display_switch *)&fbcon_banshee32)->cursor = NULL;
+#endif
+ }

init_timer(&fb_info.cursor.timer);
fb_info.cursor.timer.function = do_flashcursor;
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/vesafb.c Fri Jul 28 21:19:21 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/vesafb.c Sat Oct 14 15:20:27 2000
@@ -173,7 +173,7 @@
{
struct fb_fix_screeninfo fix;
struct display *display;
- struct display_switch *sw;
+ const struct display_switch *sw;

if (con >= 0)
display = &fb_display[con];
--- linux-const-dispsw-2.4.0-test10-pre2/drivers/video/virgefb.c Fri Jul 28 21:19:21 2000
+++ geert-const-dispsw-2.4.0-test10-pre2/drivers/video/virgefb.c Sat Oct 14 15:20:48 2000
@@ -325,11 +325,11 @@
*/

#ifdef FBCON_HAS_CFB8
-static struct display_switch fbcon_virge8;
+static const struct display_switch fbcon_virge8;
#endif

#ifdef FBCON_HAS_CFB16
-static struct display_switch fbcon_virge16;
+static const struct display_switch fbcon_virge16;
#endif

/*
@@ -1317,7 +1317,7 @@
fbcon_cfb8_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_virge8 = {
+static const struct display_switch fbcon_virge8 = {
setup: fbcon_cfb8_setup,
bmove: fbcon_virge8_bmove,
clear: fbcon_virge8_clear,
@@ -1382,7 +1382,7 @@
fbcon_cfb16_clear_margins(conp, p, bottom_only);
}

-static struct display_switch fbcon_virge16 = {
+static const struct display_switch fbcon_virge16 = {
setup: fbcon_cfb16_setup,
bmove: fbcon_virge16_bmove,
clear: fbcon_virge16_clear,
Gr{oetje,eeting}s,
Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.086 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site