omap3-sgx-modules: add 4.00.00.01 release from openembedded.org
[openembedded.git] / recipes / powervr-drivers / omap3-sgx-modules / 0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch
1 From f0fce3b189055bcf210c2811594ee9ab1b4e7e3c Mon Sep 17 00:00:00 2001
2 From: Robert Nelson <robertcnelson@gmail.com>
3 Date: Mon, 1 Nov 2010 10:23:52 -0500
4 Subject: [PATCH] OMAP3 SGX TI 4.00.00.01 2.6.37-rc1 use semaphore over mutex
5
6 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
7
8 Changes by Koen:
9
10 Protect it with #if LINUX_VERSION_CODE => KERNEL_VERSION(2,6,36)
11
12 ---
13  .../omap3-sgx/services4/srvkm/common/resman.c      |    2 +++-
14  1 files changed, 4 insertions(+), 1 deletions(-)
15
16 --- /tmp/resman.c       2010-12-04 16:15:37.000000000 +0100
17 +++ GFX_Linux_KM/services4/srvkm/common/resman.c        2010-12-04 16:16:29.000000000 +0100
18 @@ -46,7 +46,11 @@
19  #include <asm/semaphore.h>
20  #endif
21  
22 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
23 +static DEFINE_SEMAPHORE(lock);
24 +#else
25  static DECLARE_MUTEX(lock);
26 +#endif
27  
28  #define ACQUIRE_SYNC_OBJ  do {                                                 \
29                 if (in_interrupt()) {                                                   \
30 --
31 1.7.1