diff options
author | Colin Cross <ccross@android.com> | 2011-08-10 18:04:30 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-08-10 18:04:30 -0700 |
commit | 4e111751cfcb75f26d2725eab934b6eb91a3d115 (patch) | |
tree | b3d63b5b44bd2036db6e0f0b2e81769c84cc5ca3 /include/acpi/platform/aclinux.h | |
parent | ca64b0cd3a12d7704f4e98f4f5d51f41eb5047a2 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) | |
download | kernel_samsung_espresso10-4e111751cfcb75f26d2725eab934b6eb91a3d115.zip kernel_samsung_espresso10-4e111751cfcb75f26d2725eab934b6eb91a3d115.tar.gz kernel_samsung_espresso10-4e111751cfcb75f26d2725eab934b6eb91a3d115.tar.bz2 |
Merge commit 'v3.0' into android-3.0
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 5d2a5e9..2ce1be9 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__ */ |