aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/platform/aclinux.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/platform/aclinux.h')
-rw-r--r--include/acpi/platform/aclinux.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 5f532d2ac180..a568717f98c6 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -103,7 +103,10 @@
103 103
104#define acpi_thread_id struct task_struct * 104#define acpi_thread_id struct task_struct *
105 105
106static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; } 106static inline acpi_thread_id acpi_os_get_thread_id(void)
107{
108 return current;
109}
107 110
108/* 111/*
109 * The irqs_disabled() check is for resume from RAM. 112 * The irqs_disabled() check is for resume from RAM.
@@ -112,15 +115,19 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; }
112 * to quiet __might_sleep() in kmalloc() and resume does not. 115 * to quiet __might_sleep() in kmalloc() and resume does not.
113 */ 116 */
114#include <acpi/actypes.h> 117#include <acpi/actypes.h>
115static inline void *acpi_os_allocate(acpi_size size) { 118static inline void *acpi_os_allocate(acpi_size size)
116 return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); 119{
120 return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
117} 121}
118static inline void *acpi_os_allocate_zeroed(acpi_size size) { 122static inline void *acpi_os_allocate_zeroed(acpi_size size)
119 return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); 123{
124 return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
120} 125}
121 126
122static inline void *acpi_os_acquire_object(acpi_cache_t * cache) { 127static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
123 return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); 128{
129 return kmem_cache_zalloc(cache,
130 irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
124} 131}
125 132
126#define ACPI_ALLOCATE(a) acpi_os_allocate(a) 133#define ACPI_ALLOCATE(a) acpi_os_allocate(a)