diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/clgenfb.c | 8 | ||||
-rw-r--r-- | drivers/video/controlfb.c | 2 | ||||
-rw-r--r-- | drivers/video/cyberfb.c | 1 | ||||
-rw-r--r-- | drivers/video/dnfb.c | 2 | ||||
-rw-r--r-- | drivers/video/dummycon.c | 2 | ||||
-rw-r--r-- | drivers/video/fbcon.c | 9 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 4 | ||||
-rw-r--r-- | drivers/video/macfb.c | 2 | ||||
-rw-r--r-- | drivers/video/mdacon.c | 21 | ||||
-rw-r--r-- | drivers/video/newport_con.c | 2 | ||||
-rw-r--r-- | drivers/video/offb.c | 2 | ||||
-rw-r--r-- | drivers/video/promcon.c | 2 | ||||
-rw-r--r-- | drivers/video/q40fb.c | 2 | ||||
-rw-r--r-- | drivers/video/retz3fb.c | 1 | ||||
-rw-r--r-- | drivers/video/sisfb.c | 2 | ||||
-rw-r--r-- | drivers/video/sun3fb.c | 6 | ||||
-rw-r--r-- | drivers/video/vesafb.c | 2 | ||||
-rw-r--r-- | drivers/video/vgacon.c | 2 | ||||
-rw-r--r-- | drivers/video/virgefb.c | 1 |
19 files changed, 36 insertions, 37 deletions
diff --git a/drivers/video/clgenfb.c b/drivers/video/clgenfb.c index e38198485..57626f05c 100644 --- a/drivers/video/clgenfb.c +++ b/drivers/video/clgenfb.c @@ -997,10 +997,10 @@ static int clgen_decode_var (const struct fb_var_screeninfo *var, void *par, vsync *= 2; vback *= 2; } else if (_par->var.vmode & FB_VMODE_INTERLACED) { - yres = ++yres / 2; - vfront = ++vfront / 2; - vsync = ++vsync / 2; - vback = ++vback / 2; + yres = (yres + 1) / 2; + vfront = (vfront + 1) / 2; + vsync = (vsync + 1) / 2; + vback = (vback + 1) / 2; } _par->HorizRes = xres; _par->HorizTotal = (xres + hfront + hsync + hback) / 8 - 5; diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index 1e06548b3..fe64ab9a1 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c @@ -1190,7 +1190,7 @@ static void control_set_dispsw(struct display *disp, int cmode, struct fb_info_c } } -static void control_init_info(struct fb_info *info, struct fb_info_control *p) +static void __init control_init_info(struct fb_info *info, struct fb_info_control *p) { strcpy(info->modename, "control"); info->node = -1; /* ??? danj */ diff --git a/drivers/video/cyberfb.c b/drivers/video/cyberfb.c index bd7618def..5c4af6bf0 100644 --- a/drivers/video/cyberfb.c +++ b/drivers/video/cyberfb.c @@ -1070,7 +1070,6 @@ int __init cyberfb_init(void) release_mem_region(CyberRegs_phys, 0x10000); continue; } - strcpy(z->name, "CyberVision64 Graphics Board"); DPRINTK("board_addr=%08lx\n", board_addr); DPRINTK("board_size=%08lx\n", board_size); diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c index 2deaeca27..f7a5ffba3 100644 --- a/drivers/video/dnfb.c +++ b/drivers/video/dnfb.c @@ -296,7 +296,7 @@ static void dn_fb_set_disp(int con, struct fb_info *info) { } -unsigned long dnfb_init(unsigned long mem_start) { +unsigned long __init dnfb_init(unsigned long mem_start) { int err; diff --git a/drivers/video/dummycon.c b/drivers/video/dummycon.c index ee14ed409..3e08ebcb2 100644 --- a/drivers/video/dummycon.c +++ b/drivers/video/dummycon.c @@ -53,7 +53,7 @@ static int dummycon_dummy(void) * Most of the operations are dummies. */ -struct consw dummy_con = { +const struct consw dummy_con = { con_startup: dummycon_startup, con_init: dummycon_init, con_deinit: DUMMY, diff --git a/drivers/video/fbcon.c b/drivers/video/fbcon.c index c559afcca..32935dfc3 100644 --- a/drivers/video/fbcon.c +++ b/drivers/video/fbcon.c @@ -1907,12 +1907,13 @@ static unsigned long fbcon_getxy(struct vc_data *conp, unsigned long pos, int *p y += softback_lines; ret = pos + (conp->vc_cols - x) * 2; } else if (conp->vc_num == fg_console && softback_lines) { - unsigned long offset = (pos - softback_curr) / 2; + unsigned long offset = pos - softback_curr; + if (pos < softback_curr) + offset += softback_end - softback_buf; + offset /= 2; x = offset % conp->vc_cols; y = offset / conp->vc_cols; - if (pos < softback_curr) - y += (softback_end - softback_buf) / conp->vc_size_row; ret = pos + (conp->vc_cols - x) * 2; if (ret == softback_end) ret = softback_buf; @@ -2384,7 +2385,7 @@ static int __init fbcon_show_logo( void ) * The console `switch' structure for the frame buffer based console */ -struct consw fb_con = { +const struct consw fb_con = { con_startup: fbcon_startup, con_init: fbcon_init, con_deinit: fbcon_deinit, diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 015b8b946..7b3d49822 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -618,7 +618,7 @@ int GET_FB_IDX(kdev_t rdev) int fbidx = MINOR(rdev); if (fbidx >= 32) { int newfbidx = fbidx >> 5; - static int warned = 0; + static int warned; if (!(warned & (1<<newfbidx))) { warned |= 1<<newfbidx; printk("Warning: Remapping obsolete /dev/fb* minor %d to %d\n", @@ -679,7 +679,7 @@ static struct file_operations fb_fops = { release: fb_release, }; -static devfs_handle_t devfs_handle = NULL; +static devfs_handle_t devfs_handle; int register_framebuffer(struct fb_info *fb_info) diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index a5c173aa2..78538935a 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c @@ -839,7 +839,7 @@ static struct fb_ops macfb_ops = { fb_set_cmap: macfb_set_cmap, }; -void macfb_setup(char *options, int *ints) +void __init macfb_setup(char *options, int *ints) { char *this_opt; diff --git a/drivers/video/mdacon.c b/drivers/video/mdacon.c index aac8c4ab9..d988d9e39 100644 --- a/drivers/video/mdacon.c +++ b/drivers/video/mdacon.c @@ -37,6 +37,7 @@ #include <linux/vt_kern.h> #include <linux/vt_buffer.h> #include <linux/selection.h> +#include <linux/spinlock.h> #include <linux/ioport.h> #include <linux/delay.h> #include <linux/init.h> @@ -44,6 +45,7 @@ #include <asm/io.h> #include <asm/vga.h> +static spinlock_t mda_lock = SPIN_LOCK_UNLOCKED; /* description of the hardware layout */ @@ -80,7 +82,6 @@ MODULE_PARM(mda_first_vc, "1-255i"); MODULE_PARM(mda_last_vc, "1-255i"); #endif - /* MDA register values */ @@ -110,39 +111,38 @@ static void write_mda_b(unsigned int val, unsigned char reg) { unsigned long flags; - save_flags(flags); cli(); + spin_lock_irqsave(&mda_lock, flags); outb_p(reg, mda_index_port); outb_p(val, mda_value_port); - restore_flags(flags); + spin_unlock_irqrestore(&mda_lock, flags); } static void write_mda_w(unsigned int val, unsigned char reg) { unsigned long flags; - save_flags(flags); cli(); + spin_lock_irqsave(&mda_lock, flags); outb_p(reg, mda_index_port); outb_p(val >> 8, mda_value_port); outb_p(reg+1, mda_index_port); outb_p(val & 0xff, mda_value_port); - restore_flags(flags); + spin_unlock_irqrestore(&mda_lock, flags); } static int test_mda_b(unsigned char val, unsigned char reg) { unsigned long flags; - save_flags(flags); cli(); + spin_lock_irqsave(&mda_lock, flags); outb_p(reg, mda_index_port); outb (val, mda_value_port); udelay(20); val = (inb_p(mda_value_port) == val); - restore_flags(flags); - + spin_unlock_irqrestore(&mda_lock, flags); return val; } @@ -422,7 +422,8 @@ static u8 mdacon_build_attr(struct vc_data *c, u8 color, u8 intensity, static void mdacon_invert_region(struct vc_data *c, u16 *p, int count) { for (; count > 0; count--) { - scr_writew(scr_readw(p) ^ 0x0800, p++); + scr_writew(scr_readw(p) ^ 0x0800, p); + p++; } } @@ -585,7 +586,7 @@ static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) * The console `switch' structure for the MDA based console */ -struct consw mda_con = { +const struct consw mda_con = { con_startup: mdacon_startup, con_init: mdacon_init, con_deinit: mdacon_deinit, diff --git a/drivers/video/newport_con.c b/drivers/video/newport_con.c index da99d78a1..4e056d2ea 100644 --- a/drivers/video/newport_con.c +++ b/drivers/video/newport_con.c @@ -574,7 +574,7 @@ static int newport_dummy(struct vc_data *c) #define DUMMY (void *) newport_dummy -struct consw newport_con = { +const struct consw newport_con = { con_startup: newport_startup, con_init: newport_init, con_deinit: DUMMY, diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 81b08345e..1a1b7a3db 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -369,7 +369,7 @@ static void __init offb_init_nodriver(struct device_node *dp) } -static void offb_init_fb(const char *name, const char *full_name, +static void __init offb_init_fb(const char *name, const char *full_name, int width, int height, int depth, int pitch, unsigned long address, struct device_node *dp) diff --git a/drivers/video/promcon.c b/drivers/video/promcon.c index 9715ae881..9c7277b70 100644 --- a/drivers/video/promcon.c +++ b/drivers/video/promcon.c @@ -566,7 +566,7 @@ static int promcon_dummy(void) #define DUMMY (void *) promcon_dummy -struct consw prom_con = { +const struct consw prom_con = { con_startup: promcon_startup, con_init: promcon_init, con_deinit: promcon_deinit, diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index 2b798e05d..a5c68f070 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -313,7 +313,7 @@ static void q40fb_set_disp(int con, struct fb_info *info) #endif } -int q40fb_init(void) +int __init q40fb_init(void) { if ( !MACH_IS_Q40) diff --git a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c index ef39926ab..13e843c3d 100644 --- a/drivers/video/retz3fb.c +++ b/drivers/video/retz3fb.c @@ -1391,7 +1391,6 @@ int __init retz3fb_init(void) release_mem_region(board_addr, 0x00c00000); continue; } - strcpy(z->name, "Retina Z3 Graphics "); if (!(zinfo = kmalloc(sizeof(struct retz3_fb_info), GFP_KERNEL))) return -ENOMEM; diff --git a/drivers/video/sisfb.c b/drivers/video/sisfb.c index 85c8f1730..c2d460b99 100644 --- a/drivers/video/sisfb.c +++ b/drivers/video/sisfb.c @@ -3313,7 +3313,7 @@ static struct fb_ops sisfb_ops = { fb_mmap: sisfb_mmap, }; -int sisfb_setup(char *options) +int __init sisfb_setup(char *options) { char *this_opt; diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c index 3723325be..87936fc0a 100644 --- a/drivers/video/sun3fb.c +++ b/drivers/video/sun3fb.c @@ -334,7 +334,7 @@ static int sun3fb_set_cmap(struct fb_cmap *cmap, int kspc, int con, * Setup: parse used options */ -__initfunc(void sun3fb_setup(char *options)) +void __init sun3fb_setup(char *options) { char *p; @@ -521,7 +521,7 @@ void sun3fb_palette(int enter) /* * Initialisation */ -__initfunc(static void sun3fb_init_fb(int fbtype, unsigned long addr)) +static void __init sun3fb_init_fb(int fbtype, unsigned long addr) { static struct linux_sbus_device sdb; struct fb_fix_screeninfo *fix; @@ -648,7 +648,7 @@ sizechange: } -__initfunc(int sun3fb_init(void)) +int __init sun3fb_init(void) { extern int con_is_present(void); unsigned long addr; diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index fa19c744d..11e803273 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c @@ -448,7 +448,7 @@ static struct fb_ops vesafb_ops = { fb_pan_display: vesafb_pan_display, }; -int vesafb_setup(char *options) +int __init vesafb_setup(char *options) { char *this_opt; diff --git a/drivers/video/vgacon.c b/drivers/video/vgacon.c index 5ebfec7b0..8a7e0a0ff 100644 --- a/drivers/video/vgacon.c +++ b/drivers/video/vgacon.c @@ -1037,7 +1037,7 @@ static int vgacon_dummy(struct vc_data *c) #define DUMMY (void *) vgacon_dummy -struct consw vga_con = { +const struct consw vga_con = { con_startup: vgacon_startup, con_init: vgacon_init, con_deinit: vgacon_deinit, diff --git a/drivers/video/virgefb.c b/drivers/video/virgefb.c index 6be952607..ed7bad2b1 100644 --- a/drivers/video/virgefb.c +++ b/drivers/video/virgefb.c @@ -1139,7 +1139,6 @@ int __init virgefb_init(void) release_mem_region(CyberRegs_phys, 0x10000); continue; } - strcpy(z->name, "CyberVision64-3D Graphics Board"); if (board_addr < 0x01000000) { /* |