From 4f37f2dabb3c3ef9675c7e9b3980aa9da78e4754 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 15 Jan 2006 09:35:15 +0000 Subject: V4L/DVB (3354e): bttv semaphore to mutex conversion From: Ingo Molnar Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. build-tested. Signed-off-by: Ingo Molnar Signed-off-by: Mauro Carvalho Chehab kernel-sync --- v4l/compat.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'v4l/compat.h') diff --git a/v4l/compat.h b/v4l/compat.h index a35acc464..774afc8da 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.43 2005/12/11 18:11:56 mchehab Exp $ + * $Id: compat.h,v 1.44 2006/01/15 09:35:16 mchehab Exp $ */ #ifndef _COMPAT_H @@ -270,6 +270,14 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) # define input_free_device(input_dev) kfree(input_dev) #endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) +#define DEFINE_MUTEX(a) DECLARE_MUTEX(a) +#define mutex_lock_interruptible(a) down_interruptible(a) +#define mutex_unlock(a) up(a) +#define mutex_lock(a) down(a) +#define mutex_init(a) init_MUTEX(a) +#endif + #endif /* * Local variables: -- cgit v1.2.3