Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
[safe/jmp/linux-2.6] / drivers / video / vga16fb.c
index e31bca8..bf638a4 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
 #include <linux/ioport.h>
@@ -58,7 +57,6 @@ struct vga16fb_par {
                unsigned char   ClockingMode;     /* Seq-Controller:01h */
        } vga_state;
        struct vgastate state;
-       struct mutex open_lock;
        unsigned int ref_count;
        int palette_blanked, vesa_blanked, mode, isVGA;
        u8 misc, pel_msk, vss, clkdiv;
@@ -286,7 +284,6 @@ static int vga16fb_open(struct fb_info *info, int user)
 {
        struct vga16fb_par *par = info->par;
 
-       mutex_lock(&par->open_lock);
        if (!par->ref_count) {
                memset(&par->state, 0, sizeof(struct vgastate));
                par->state.flags = VGA_SAVE_FONTS | VGA_SAVE_MODE |
@@ -294,7 +291,6 @@ static int vga16fb_open(struct fb_info *info, int user)
                save_vga(&par->state);
        }
        par->ref_count++;
-       mutex_unlock(&par->open_lock);
 
        return 0;
 }
@@ -303,15 +299,12 @@ static int vga16fb_release(struct fb_info *info, int user)
 {
        struct vga16fb_par *par = info->par;
 
-       mutex_lock(&par->open_lock);
-       if (!par->ref_count) {
-               mutex_unlock(&par->open_lock);
+       if (!par->ref_count)
                return -EINVAL;
-       }
+
        if (par->ref_count == 1)
                restore_vga(&par->state);
        par->ref_count--;
-       mutex_unlock(&par->open_lock);
 
        return 0;
 }
@@ -1299,7 +1292,7 @@ static int vga16fb_setup(char *options)
 }
 #endif
 
-static int __init vga16fb_probe(struct platform_device *dev)
+static int __devinit vga16fb_probe(struct platform_device *dev)
 {
        struct fb_info *info;
        struct vga16fb_par *par;
@@ -1326,7 +1319,6 @@ static int __init vga16fb_probe(struct platform_device *dev)
        printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base);
        par = info->par;
 
-       mutex_init(&par->open_lock);
        par->isVGA = screen_info.orig_video_isVGA;
        par->palette_blanked = 0;
        par->vesa_blanked = 0;