]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/mutex-debug.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / include / linux / mutex-debug.h
index 70a26091fc73f7fb942d189a56bea557efe18d6a..731d77d6e155de48fed65db977d2e83843465c06 100644 (file)
@@ -2,6 +2,7 @@
 #define __LINUX_MUTEX_DEBUG_H
 
 #include <linux/linkage.h>
+#include <linux/lockdep.h>
 
 /*
  * Mutexes - debugging helpers:
 #define __DEBUG_MUTEX_INITIALIZER(lockname)                            \
        , .magic = &lockname
 
-#define mutex_init(sem)                __mutex_init(sem, __FILE__":"#sem)
+#define mutex_init(mutex)                                              \
+do {                                                                   \
+       static struct lock_class_key __key;                             \
+                                                                       \
+       __mutex_init((mutex), #mutex, &__key);                          \
+} while (0)
 
-extern void FASTCALL(mutex_destroy(struct mutex *lock));
+extern void mutex_destroy(struct mutex *lock);
 
 #endif