diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-21 13:38:42 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 13:38:42 -0700 |
commit | 033b1142f4bd44a116d1356fe4a0510437ceddf9 (patch) | |
tree | d2a971a7dc9f3a1af8035e38419c4c4ad8c22632 /include/acpi/platform/aclinux.h | |
parent | f5caadbb3d8fc0b71533e880c684b2230bdb76ac (diff) | |
parent | e6625fa48e6580a74b7e700efd7e6463e282810b (diff) | |
download | linux-stable-033b1142f4bd44a116d1356fe4a0510437ceddf9.tar.gz linux-stable-033b1142f4bd44a116d1356fe4a0510437ceddf9.tar.bz2 linux-stable-033b1142f4bd44a116d1356fe4a0510437ceddf9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/bluetooth/l2cap_core.c
Diffstat (limited to 'include/acpi/platform/aclinux.h')
-rw-r--r-- | include/acpi/platform/aclinux.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 5d2a5e9544d9..2ce1be9f6291 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -159,6 +159,24 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) } while (0) #endif +/* + * When lockdep is enabled, the spin_lock_init() macro stringifies it's + * argument and uses that as a name for the lock in debugging. + * By executing spin_lock_init() in a macro the key changes from "lock" for + * all locks to the name of the argument of acpi_os_create_lock(), which + * prevents lockdep from reporting false positives for ACPICA locks. + */ +#define acpi_os_create_lock(__handle) \ +({ \ + spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \ + \ + if (lock) { \ + *(__handle) = lock; \ + spin_lock_init(*(__handle)); \ + } \ + lock ? AE_OK : AE_NO_MEMORY; \ +}) + #endif /* __KERNEL__ */ #endif /* __ACLINUX_H__ */ |