diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-10-16 07:03:33 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 20:21:42 +0200 |
commit | 3a568051f3ae23d1a570a3d58eacde55279c632e (patch) | |
tree | 308f76a3d34dc2b766f413c17b874d1338bdc8e1 /drivers | |
parent | vga16fb: remove open_lock mutex (diff) | |
download | linux-3a568051f3ae23d1a570a3d58eacde55279c632e.tar.xz linux-3a568051f3ae23d1a570a3d58eacde55279c632e.zip |
neofb: remove open_lock mutex
Remove mutex from the fb_open/fb_release functions as these operations are
mutexed at fb layer.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/neofb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index dea864552588..bfb802d26d5a 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c @@ -557,14 +557,12 @@ neofb_open(struct fb_info *info, int user) { struct neofb_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_MODE | VGA_SAVE_FONTS; save_vga(&par->state); } par->ref_count++; - mutex_unlock(&par->open_lock); return 0; } @@ -574,16 +572,13 @@ neofb_release(struct fb_info *info, int user) { struct neofb_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; } @@ -1958,7 +1953,6 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st info->fix.accel = id->driver_data; - mutex_init(&par->open_lock); par->pci_burst = !nopciburst; par->lcd_stretch = !nostretch; par->libretto = libretto; |