From 9dab8884095e0710d62c41c45191a85d0dae59b3 Mon Sep 17 00:00:00 2001
From: Henrik Rydberg <rydberg@euromail.se>
Date: Sun, 9 Jan 2011 19:47:43 +0100
Subject: [PATCH] Make up for the missing init_MUTEX

The init_MUTEX is a wrapper for sema_init(), and has been
deprecated and removed in 2.6.37. In order for the dkms
package to work also for earlier kernel versions, simply
define the wrapper if it is missing.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
 src/src/wl/sys/wl_linux.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/x86-64/src/src/wl/sys/wl_linux.c b/x86-64/src/src/wl/sys/wl_linux.c
index c11678f..6f4b7a6 100644
--- a/x86-64/src.orig/wl/sys/wl_linux.c
+++ b/x86-64/src/wl/sys/wl_linux.c
@@ -99,6 +99,10 @@ static void wl_dpc_rxwork(struct wl_task *task);

 #endif

+#ifndef init_MUTEX
+#define init_MUTEX(sem) sema_init(sem, 1)
+#endif
+
 static int wl_linux_watchdog(void *ctx);
 static
 int wl_found = 0;
--
1.7.2.3
