From c4f28e54d61278203c2bb2aea0679e0a738235d2 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 12 Feb 2007 00:55:11 -0800 Subject: [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 Acked-by: Denis Oliver Kropp Cc: James Simmons Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/riva/rivafb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/video/riva/rivafb.h') diff --git a/drivers/video/riva/rivafb.h b/drivers/video/riva/rivafb.h index 7fa13fc9c41..48ead6d72f2 100644 --- a/drivers/video/riva/rivafb.h +++ b/drivers/video/riva/rivafb.h @@ -53,7 +53,8 @@ struct riva_par { #ifdef CONFIG_X86 struct vgastate state; #endif - atomic_t ref_count; + struct mutex open_lock; + unsigned int ref_count; unsigned char *EDID; unsigned int Chipset; int forceCRTC; -- cgit v1.2.3