regmap: allow regmap instances to be named
[linux-2.6.git] / include / linux / mutex-debug.h
index 70a2609..731d77d 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