From 5cfbd5dbab4fe9668771377cb22da04c6103459e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 24 Jul 2006 10:51:27 +1000 Subject: switch drm to use Linux mutexes instead of semaphore. I hope the fallback compat code works if not shout at me. --- linux-core/drm_compat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 03749d14..4f3a6688 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -195,6 +195,16 @@ static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +#define mutex_lock down +#define mutex_unlock up + +#define mutex semaphore + +#define mutex_init(a) sema_init((a), 1) + +#endif + /* old architectures */ #ifdef __AMD64__ #define __x86_64__ -- cgit v1.2.3