aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/i810/i810.h
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-12 03:55:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:42 -0500
commitc4f28e54d61278203c2bb2aea0679e0a738235d2 (patch)
treed92cf0718084a4e659444741443ee38afb847836 /drivers/video/i810/i810.h
parent52e7c922f37907ab3cf3445b916fbbc53cbd6c75 (diff)
[PATCH] Video: fb, add true ref_count atomicity
Some of fb drivers uses atomic_t in bad manner, since there are still some race-prone gaps. Use mutexes to protect open/close code sections with ref_count testing and finally use simple uint. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Denis Oliver Kropp <dok@directfb.org> Cc: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/i810/i810.h')
-rw-r--r--drivers/video/i810/i810.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/i810/i810.h b/drivers/video/i810/i810.h
index 579195c2bea3..aa65ffce915b 100644
--- a/drivers/video/i810/i810.h
+++ b/drivers/video/i810/i810.h
@@ -264,7 +264,8 @@ struct i810fb_par {
264 struct heap_data cursor_heap; 264 struct heap_data cursor_heap;
265 struct vgastate state; 265 struct vgastate state;
266 struct i810fb_i2c_chan chan[3]; 266 struct i810fb_i2c_chan chan[3];
267 atomic_t use_count; 267 struct mutex open_lock;
268 unsigned int use_count;
268 u32 pseudo_palette[17]; 269 u32 pseudo_palette[17];
269 unsigned long mmio_start_phys; 270 unsigned long mmio_start_phys;
270 u8 __iomem *mmio_start_virtual; 271 u8 __iomem *mmio_start_virtual;