···159159 } while (0)160160#endif161161162162+/*163163+ * When lockdep is enabled, the spin_lock_init() macro stringifies it's164164+ * argument and uses that as a name for the lock in debugging.165165+ * By executing spin_lock_init() in a macro the key changes from "lock" for166166+ * all locks to the name of the argument of acpi_os_create_lock(), which167167+ * prevents lockdep from reporting false positives for ACPICA locks.168168+ */169169+#define acpi_os_create_lock(__handle) \170170+({ \171171+ spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \172172+ \173173+ if (lock) { \174174+ *(__handle) = lock; \175175+ spin_lock_init(*(__handle)); \176176+ } \177177+ lock ? AE_OK : AE_NO_MEMORY; \178178+})179179+162180#endif /* __KERNEL__ */163181164182#endif /* __ACLINUX_H__ */