Commit ece1c8ef authored by James Simmons's avatar James Simmons

C99 fixes. Framebuffer console fix.

parent 0dc1531b
...@@ -681,7 +681,6 @@ static void fbcon_deinit(struct vc_data *vc) ...@@ -681,7 +681,6 @@ static void fbcon_deinit(struct vc_data *vc)
p->conp = 0; p->conp = 0;
} }
#define fontwidthvalid(p,w) ((p)->fontwidthmask & FONTWIDTH(w)) #define fontwidthvalid(p,w) ((p)->fontwidthmask & FONTWIDTH(w))
static int fbcon_changevar(int con) static int fbcon_changevar(int con)
...@@ -734,12 +733,14 @@ static int fbcon_changevar(int con) ...@@ -734,12 +733,14 @@ static int fbcon_changevar(int con)
p->fontdata = font->data; p->fontdata = font->data;
} }
#ifdef FBCON_FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) { if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */ /* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n", "fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width); vc->vc_font.width);
} }
#endif
updatescrollmode(p, vc); updatescrollmode(p, vc);
old_cols = vc->vc_cols; old_cols = vc->vc_cols;
...@@ -878,12 +879,14 @@ static void fbcon_set_display(int con, int init, int logo) ...@@ -878,12 +879,14 @@ static void fbcon_set_display(int con, int init, int logo)
p->fontdata = font->data; p->fontdata = font->data;
} }
#ifdef FBCON_FONTWIDTH8_ONLY
if (!fontwidthvalid(p, vc->vc_font.width)) { if (!fontwidthvalid(p, vc->vc_font.width)) {
/* ++Geert: changed from panic() to `correct and continue' */ /* ++Geert: changed from panic() to `correct and continue' */
printk(KERN_ERR printk(KERN_ERR
"fbcon_set_display: No support for fontwidth %d\n", "fbcon_set_display: No support for fontwidth %d\n",
vc->vc_font.width); vc->vc_font.width);
} }
#endif
updatescrollmode(p, vc); updatescrollmode(p, vc);
old_cols = vc->vc_cols; old_cols = vc->vc_cols;
......
...@@ -84,21 +84,21 @@ static struct fb_fix_screeninfo fb_fix __initdata = { ...@@ -84,21 +84,21 @@ static struct fb_fix_screeninfo fb_fix __initdata = {
}; };
static struct fb_var_screeninfo fb_var __initdata = { static struct fb_var_screeninfo fb_var __initdata = {
.bits_per_pixel =8, .bits_per_pixel = 8,
.red = { 0, 8, 0 }, .red = { 0, 8, 0 },
green: { 0, 8, 0 }, .green = { 0, 8, 0 },
blue: { 0, 8, 0 }, .blue = { 0, 8, 0 },
activate:FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
height: -1, .height = -1,
width: -1, .width = -1,
pixclock:39722, .pixclock = 39722,
left_margin: 40, .left_margin = 40,
right_margin: 24, .right_margin = 24,
upper_margin: 32, .upper_margin = 32,
lower_margin: 11, .lower_margin = 11,
hsync_len: 96, .hsync_len = 96,
vsync_len: 2, .vsync_len = 2,
vmode: FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
}; };
/* /*
......
...@@ -47,7 +47,10 @@ static struct fb_var_screeninfo maxinefb_defined = { ...@@ -47,7 +47,10 @@ static struct fb_var_screeninfo maxinefb_defined = {
.yres = 768, .yres = 768,
.xres_virtual = 1024, .xres_virtual = 1024,
.yres_virtual = 768, .yres_virtual = 768,
.bits_per_pixel =8, .bits_per_pixel = 8,
.red.length = 8,
.green.length = 8,
.blue.length = 8,
.activate = FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
.height = -1, .height = -1,
.width = -1, .width = -1,
...@@ -60,7 +63,7 @@ static struct fb_fix_screeninfo maxinefb_fix = { ...@@ -60,7 +63,7 @@ static struct fb_fix_screeninfo maxinefb_fix = {
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.line_length = 1024, .line_length = 1024,
} };
/* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */ /* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */
extern unsigned long mips_machtype; extern unsigned long mips_machtype;
......
...@@ -56,13 +56,16 @@ static struct fb_var_screeninfo pmagbafb_defined = { ...@@ -56,13 +56,16 @@ static struct fb_var_screeninfo pmagbafb_defined = {
.yres = 864, .yres = 864,
.xres_virtual = 1024, .xres_virtual = 1024,
.yres_virtual = 864, .yres_virtual = 864,
.bits_per_pixel =8, .bits_per_pixel = 8,
.red.length = 8,
.green.length = 8,
.blue.length = 8,
.activate = FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
.height = 274, .height = 274,
.width = 195, .width = 195,
.accel = FB_ACCEL_NONE, .accel = FB_ACCEL_NONE,
.vmode = FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
} };
static struct fb_fix_screeninfo pmagbafb_fix = { static struct fb_fix_screeninfo pmagbafb_fix = {
.id = "PMAG-BA", .id = "PMAG-BA",
...@@ -70,7 +73,7 @@ static struct fb_fix_screeninfo pmagbafb_fix = { ...@@ -70,7 +73,7 @@ static struct fb_fix_screeninfo pmagbafb_fix = {
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_PSEUDOCOLOR, .visual = FB_VISUAL_PSEUDOCOLOR,
.line_length = 1024, .line_length = 1024,
} };
/* /*
* Turn hardware cursor off * Turn hardware cursor off
...@@ -113,7 +116,7 @@ static struct fb_ops pmagbafb_ops = { ...@@ -113,7 +116,7 @@ static struct fb_ops pmagbafb_ops = {
.fb_copyarea = cfb_copyarea, .fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_cursor = soft_cursor, .fb_cursor = soft_cursor,
} };
int __init pmagbafb_init_one(int slot) int __init pmagbafb_init_one(int slot)
{ {
...@@ -170,9 +173,4 @@ int __init pmagbafb_init(void) ...@@ -170,9 +173,4 @@ int __init pmagbafb_init(void)
} }
} }
int __init pmagbafb_setup(char *options)
{
return 0;
}
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -59,7 +59,10 @@ static struct fb_var_screeninfo pmagbbfb_defined = { ...@@ -59,7 +59,10 @@ static struct fb_var_screeninfo pmagbbfb_defined = {
.yres = 1024, .yres = 1024,
.xres_virtual = 1280, .xres_virtual = 1280,
.yres_virtual = 1024, .yres_virtual = 1024,
.bits_per_pixel =8, .bits_per_pixel = 8,
.red.length = 8,
.green.length = 8,
.blue.length = 8,
.activate = FB_ACTIVATE_NOW, .activate = FB_ACTIVATE_NOW,
.height = 274, .height = 274,
.width = 195, .width = 195,
...@@ -173,9 +176,4 @@ int __init pmagbbfb_init(void) ...@@ -173,9 +176,4 @@ int __init pmagbbfb_init(void)
} }
} }
int __init pmagbbfb_setup(char *options)
{
return 0;
}
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment