diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-10-20 11:17:52 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-10-20 11:17:52 +0900 |
commit | 4cb40f795af36b3deb743f6ccf6c3fd542c61c8d (patch) | |
tree | db3d7519932549bf528f5b8e4cb8350356cd544d /drivers/video/vga16fb.c | |
parent | 79ed2a9216dd3cc35c4f2c5dbaddadb195af83ac (diff) | |
parent | 0cfd81031a26717fe14380d18275f8e217571615 (diff) | |
download | op-kernel-dev-4cb40f795af36b3deb743f6ccf6c3fd542c61c8d.zip op-kernel-dev-4cb40f795af36b3deb743f6ccf6c3fd542c61c8d.tar.gz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/kernel-parameters.txt
arch/sh/include/asm/elf.h
Diffstat (limited to 'drivers/video/vga16fb.c')
-rw-r--r-- | drivers/video/vga16fb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index e31bca8..5b29389 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c @@ -58,7 +58,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 +285,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 +292,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 +300,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; } @@ -1326,7 +1320,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; |