Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114845
b: refs/heads/master
c: 3a56805
h: refs/heads/master
i:
  114843: 21452f0
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Oct 16, 2008
1 parent 3eca3ea commit 21078d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c8db4a265ee5000d8c21634277ec1eb9ceebc7f
refs/heads/master: 3a568051f3ae23d1a570a3d58eacde55279c632e
10 changes: 2 additions & 8 deletions trunk/drivers/video/neofb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/video/neomagic.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ typedef volatile struct {

struct neofb_par {
struct vgastate state;
struct mutex open_lock;
unsigned int ref_count;

unsigned char MiscOutReg; /* Misc */
Expand Down

0 comments on commit 21078d2

Please sign in to comment.