Use sema_init() instead of init_MUTEX()
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sun, 31 Jan 2010 07:01:47 +0000 (07:01 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sun, 31 Jan 2010 07:01:47 +0000 (07:01 +0000)
init_MUTEX() is missing on kernels with realtime patches.  Besides,
init_MUTEX is a confusing name, since it initializes a semaphore,
whereas newer kernels have real mutexes as well.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4118 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_athvar.h

index e70f76f08b9d1c4f3f82c4afb01c39946204320a..f91ec8f728b13e182f23c868ff7ef01abbec86c8 100644 (file)
@@ -990,7 +990,7 @@ typedef void (*ath_callback) (struct ath_softc *);
 #include <asm/semaphore.h>
 #endif
 /* Protects the device from concurrent accesses */
-#define        ATH_LOCK_INIT(_sc)              init_MUTEX(&(_sc)->sc_lock)
+#define        ATH_LOCK_INIT(_sc)              sema_init(&(_sc)->sc_lock, 1)
 #define        ATH_LOCK_DESTROY(_sc)
 #define        ATH_LOCK(_sc)                   down(&(_sc)->sc_lock)
 #define        ATH_UNLOCK(_sc)                 up(&(_sc)->sc_lock)