diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-10-16 01:03:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:42 -0400 |
commit | 9c8db4a265ee5000d8c21634277ec1eb9ceebc7f (patch) | |
tree | 60090fb5e8fee914fe3603176ba350f116fed12d /drivers | |
parent | 0716a8eab3c8d21b4e36839fa0ee26abbf8e01ef (diff) |
vga16fb: 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/vga16fb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index e31bca8a0cb2..5b2938903ac2 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
@@ -58,7 +58,6 @@ struct vga16fb_par { | |||
58 | unsigned char ClockingMode; /* Seq-Controller:01h */ | 58 | unsigned char ClockingMode; /* Seq-Controller:01h */ |
59 | } vga_state; | 59 | } vga_state; |
60 | struct vgastate state; | 60 | struct vgastate state; |
61 | struct mutex open_lock; | ||
62 | unsigned int ref_count; | 61 | unsigned int ref_count; |
63 | int palette_blanked, vesa_blanked, mode, isVGA; | 62 | int palette_blanked, vesa_blanked, mode, isVGA; |
64 | u8 misc, pel_msk, vss, clkdiv; | 63 | u8 misc, pel_msk, vss, clkdiv; |
@@ -286,7 +285,6 @@ static int vga16fb_open(struct fb_info *info, int user) | |||
286 | { | 285 | { |
287 | struct vga16fb_par *par = info->par; | 286 | struct vga16fb_par *par = info->par; |
288 | 287 | ||
289 | mutex_lock(&par->open_lock); | ||
290 | if (!par->ref_count) { | 288 | if (!par->ref_count) { |
291 | memset(&par->state, 0, sizeof(struct vgastate)); | 289 | memset(&par->state, 0, sizeof(struct vgastate)); |
292 | par->state.flags = VGA_SAVE_FONTS | VGA_SAVE_MODE | | 290 | par->state.flags = VGA_SAVE_FONTS | VGA_SAVE_MODE | |
@@ -294,7 +292,6 @@ static int vga16fb_open(struct fb_info *info, int user) | |||
294 | save_vga(&par->state); | 292 | save_vga(&par->state); |
295 | } | 293 | } |
296 | par->ref_count++; | 294 | par->ref_count++; |
297 | mutex_unlock(&par->open_lock); | ||
298 | 295 | ||
299 | return 0; | 296 | return 0; |
300 | } | 297 | } |
@@ -303,15 +300,12 @@ static int vga16fb_release(struct fb_info *info, int user) | |||
303 | { | 300 | { |
304 | struct vga16fb_par *par = info->par; | 301 | struct vga16fb_par *par = info->par; |
305 | 302 | ||
306 | mutex_lock(&par->open_lock); | 303 | if (!par->ref_count) |
307 | if (!par->ref_count) { | ||
308 | mutex_unlock(&par->open_lock); | ||
309 | return -EINVAL; | 304 | return -EINVAL; |
310 | } | 305 | |
311 | if (par->ref_count == 1) | 306 | if (par->ref_count == 1) |
312 | restore_vga(&par->state); | 307 | restore_vga(&par->state); |
313 | par->ref_count--; | 308 | par->ref_count--; |
314 | mutex_unlock(&par->open_lock); | ||
315 | 309 | ||
316 | return 0; | 310 | return 0; |
317 | } | 311 | } |
@@ -1326,7 +1320,6 @@ static int __init vga16fb_probe(struct platform_device *dev) | |||
1326 | printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base); | 1320 | printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base); |
1327 | par = info->par; | 1321 | par = info->par; |
1328 | 1322 | ||
1329 | mutex_init(&par->open_lock); | ||
1330 | par->isVGA = screen_info.orig_video_isVGA; | 1323 | par->isVGA = screen_info.orig_video_isVGA; |
1331 | par->palette_blanked = 0; | 1324 | par->palette_blanked = 0; |
1332 | par->vesa_blanked = 0; | 1325 | par->vesa_blanked = 0; |