aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-07-10 01:35:51 -0400
committerLen Brown <len.brown@intel.com>2006-07-10 02:37:22 -0400
commite21c1ca3f98529921c829a792dfdbfc5a5dc393b (patch)
treefdb0a3c00d46db197ae65e6c66fc841b194cb507 /drivers/acpi/osl.c
parentb3cf257623fabd8f1ee6700a6d328cc1c5da5a1d (diff)
ACPI: acpi_os_allocate() fixes
Replace acpi_in_resume with a more general hack to check irqs_disabled() on any kmalloc() from ACPI. While setting (system_state != SYSTEM_RUNNING) on resume seemed more general, Andrew Morton preferred this approach. http://bugzilla.kernel.org/show_bug.cgi?id=3469 Make acpi_os_allocate() into an inline function to allow /proc/slab_allocators to work. Delete some memset() that could fault on allocation failure. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index eedb05c6dc7b..47dfde95b8f8 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -136,16 +136,6 @@ void acpi_os_vprintf(const char *fmt, va_list args)
136#endif 136#endif
137} 137}
138 138
139
140extern int acpi_in_resume;
141void *acpi_os_allocate(acpi_size size)
142{
143 if (acpi_in_resume)
144 return kmalloc(size, GFP_ATOMIC);
145 else
146 return kmalloc(size, GFP_KERNEL);
147}
148
149acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr) 139acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
150{ 140{
151 if (efi_enabled) { 141 if (efi_enabled) {
@@ -1115,26 +1105,6 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
1115 return (AE_OK); 1105 return (AE_OK);
1116} 1106}
1117 1107
1118/*******************************************************************************
1119 *
1120 * FUNCTION: acpi_os_acquire_object
1121 *
1122 * PARAMETERS: Cache - Handle to cache object
1123 * ReturnObject - Where the object is returned
1124 *
1125 * RETURN: Status
1126 *
1127 * DESCRIPTION: Return a zero-filled object.
1128 *
1129 ******************************************************************************/
1130
1131void *acpi_os_acquire_object(acpi_cache_t * cache)
1132{
1133 void *object = kmem_cache_zalloc(cache, GFP_KERNEL);
1134 WARN_ON(!object);
1135 return object;
1136}
1137
1138/****************************************************************************** 1108/******************************************************************************
1139 * 1109 *
1140 * FUNCTION: acpi_os_validate_interface 1110 * FUNCTION: acpi_os_validate_interface