aboutsummaryrefslogtreecommitdiffstats
path: root/include/video/neomagic.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 /include/video/neomagic.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 'include/video/neomagic.h')
-rw-r--r--include/video/neomagic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/video/neomagic.h b/include/video/neomagic.h
index 78b1f15a538f..a9e118a1cd16 100644
--- a/include/video/neomagic.h
+++ b/include/video/neomagic.h
@@ -140,7 +140,8 @@ typedef volatile struct {
140 140
141struct neofb_par { 141struct neofb_par {
142 struct vgastate state; 142 struct vgastate state;
143 atomic_t ref_count; 143 struct mutex open_lock;
144 unsigned int ref_count;
144 145
145 unsigned char MiscOutReg; /* Misc */ 146 unsigned char MiscOutReg; /* Misc */
146 unsigned char CRTC[25]; /* Crtc Controller */ 147 unsigned char CRTC[25]; /* Crtc Controller */