aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-07-01 17:19:08 -0400
committerLen Brown <len.brown@intel.com>2006-07-01 17:19:08 -0400
commitb197ba3c70638a3a2ae39296781912f26ac0f991 (patch)
tree596f795437337d86edaa02d612120f4d5b3ce35d /drivers/acpi
parentfc25465f09414538afdbceacc517dd4dbabadeca (diff)
parent02438d8771ae6a4b215938959827692026380bf9 (diff)
Pull acpi_os_free into release branch
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_memhotplug.c4
-rw-r--r--drivers/acpi/asus_acpi.c6
-rw-r--r--drivers/acpi/battery.c4
-rw-r--r--drivers/acpi/container.c2
-rw-r--r--drivers/acpi/glue.c8
-rw-r--r--drivers/acpi/namespace/nsxfeval.c2
-rw-r--r--drivers/acpi/osl.c9
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/acpi/processor_perflib.c6
-rw-r--r--drivers/acpi/scan.c4
-rw-r--r--drivers/acpi/system.c4
-rw-r--r--drivers/acpi/utilities/utalloc.c4
-rw-r--r--drivers/acpi/utilities/utcache.c2
-rw-r--r--drivers/acpi/utils.c4
-rw-r--r--drivers/acpi/video.c2
15 files changed, 28 insertions, 35 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index cd57372a6729..84a68965c11a 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -466,7 +466,7 @@ static acpi_status is_memory_device(acpi_handle handle)
466 466
467 info = buffer.pointer; 467 info = buffer.pointer;
468 if (!(info->valid & ACPI_VALID_HID)) { 468 if (!(info->valid & ACPI_VALID_HID)) {
469 acpi_os_free(buffer.pointer); 469 kfree(buffer.pointer);
470 return AE_ERROR; 470 return AE_ERROR;
471 } 471 }
472 472
@@ -475,7 +475,7 @@ static acpi_status is_memory_device(acpi_handle handle)
475 (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) 475 (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID)))
476 status = AE_ERROR; 476 status = AE_ERROR;
477 477
478 acpi_os_free(buffer.pointer); 478 kfree(buffer.pointer);
479 return status; 479 return status;
480} 480}
481 481
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 055cfd5c8766..eb0b8fb837c6 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1017,7 +1017,7 @@ static int asus_hotk_get_info(void)
1017 } 1017 }
1018 hotk->methods = &model_conf[hotk->model]; 1018 hotk->methods = &model_conf[hotk->model];
1019 1019
1020 acpi_os_free(model); 1020 kfree(model);
1021 1021
1022 return AE_OK; 1022 return AE_OK;
1023 } 1023 }
@@ -1096,7 +1096,7 @@ static int asus_hotk_get_info(void)
1096 /* S1300A reports L84F, but L1400B too, account for that */ 1096 /* S1300A reports L84F, but L1400B too, account for that */
1097 } 1097 }
1098 1098
1099 acpi_os_free(model); 1099 kfree(model);
1100 1100
1101 return AE_OK; 1101 return AE_OK;
1102} 1102}
@@ -1256,7 +1256,7 @@ static void __exit asus_acpi_exit(void)
1256 acpi_bus_unregister_driver(&asus_hotk_driver); 1256 acpi_bus_unregister_driver(&asus_hotk_driver);
1257 remove_proc_entry(PROC_ASUS, acpi_root_dir); 1257 remove_proc_entry(PROC_ASUS, acpi_root_dir);
1258 1258
1259 acpi_os_free(asus_info); 1259 kfree(asus_info);
1260 1260
1261 return; 1261 return;
1262} 1262}
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 00b0728efe82..7d92f73b265f 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -171,7 +171,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
171 } 171 }
172 172
173 end: 173 end:
174 acpi_os_free(buffer.pointer); 174 kfree(buffer.pointer);
175 175
176 if (!result) 176 if (!result)
177 (*bif) = (struct acpi_battery_info *)data.pointer; 177 (*bif) = (struct acpi_battery_info *)data.pointer;
@@ -231,7 +231,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
231 } 231 }
232 232
233 end: 233 end:
234 acpi_os_free(buffer.pointer); 234 kfree(buffer.pointer);
235 235
236 if (!result) 236 if (!result)
237 (*bst) = (struct acpi_battery_status *)data.pointer; 237 (*bst) = (struct acpi_battery_status *)data.pointer;
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 7f7e41d40a3b..871aa520ece7 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -236,7 +236,7 @@ container_walk_namespace_cb(acpi_handle handle,
236 } 236 }
237 237
238 end: 238 end:
239 acpi_os_free(buffer.pointer); 239 kfree(buffer.pointer);
240 240
241 return AE_OK; 241 return AE_OK;
242} 242}
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 8daef57b994c..10f160dc75b1 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -152,7 +152,7 @@ static int get_root_bridge_busnr(acpi_handle handle)
152 bbn = bus; 152 bbn = bus;
153 } 153 }
154 exit: 154 exit:
155 acpi_os_free(buffer.pointer); 155 kfree(buffer.pointer);
156 return (int)bbn; 156 return (int)bbn;
157} 157}
158 158
@@ -192,7 +192,7 @@ find_pci_rootbridge(acpi_handle handle, u32 lvl, void *context, void **rv)
192 find->handle = handle; 192 find->handle = handle;
193 status = AE_OK; 193 status = AE_OK;
194 exit: 194 exit:
195 acpi_os_free(buffer.pointer); 195 kfree(buffer.pointer);
196 return status; 196 return status;
197} 197}
198 198
@@ -224,7 +224,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
224 info = buffer.pointer; 224 info = buffer.pointer;
225 if (info->address == find->address) 225 if (info->address == find->address)
226 find->handle = handle; 226 find->handle = handle;
227 acpi_os_free(buffer.pointer); 227 kfree(buffer.pointer);
228 } 228 }
229 return AE_OK; 229 return AE_OK;
230} 230}
@@ -330,7 +330,7 @@ static int acpi_platform_notify(struct device *dev)
330 330
331 acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer); 331 acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer);
332 DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); 332 DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer);
333 acpi_os_free(buffer.pointer); 333 kfree(buffer.pointer);
334 } else 334 } else
335 DBG("Device %s -> No ACPI support\n", dev->bus_id); 335 DBG("Device %s -> No ACPI support\n", dev->bus_id);
336#endif 336#endif
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index 6d9bd45af30a..dca6799ac678 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -133,7 +133,7 @@ acpi_evaluate_object_typed(acpi_handle handle,
133 133
134 /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ 134 /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */
135 135
136 acpi_os_free(return_buffer->pointer); 136 ACPI_FREE(return_buffer->pointer);
137 return_buffer->pointer = NULL; 137 return_buffer->pointer = NULL;
138 } 138 }
139 139
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 5dd2ed11a387..d4bd314d60ba 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -146,13 +146,6 @@ void *acpi_os_allocate(acpi_size size)
146 return kmalloc(size, GFP_KERNEL); 146 return kmalloc(size, GFP_KERNEL);
147} 147}
148 148
149void acpi_os_free(void *ptr)
150{
151 kfree(ptr);
152}
153
154EXPORT_SYMBOL(acpi_os_free);
155
156acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr) 149acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
157{ 150{
158 if (efi_enabled) { 151 if (efi_enabled) {
@@ -742,7 +735,7 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
742 735
743 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle)); 736 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
744 737
745 acpi_os_free(sem); 738 kfree(sem);
746 sem = NULL; 739 sem = NULL;
747 740
748 return AE_OK; 741 return AE_OK;
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e439eb77d283..8e9c26aae8fe 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -768,7 +768,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
768 status = -EFAULT; 768 status = -EFAULT;
769 769
770 end: 770 end:
771 acpi_os_free(buffer.pointer); 771 kfree(buffer.pointer);
772 772
773 return status; 773 return status;
774} 774}
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 14a00e5a8f6a..7ba5e49ab302 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -216,7 +216,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
216 sizeof(struct acpi_pct_register)); 216 sizeof(struct acpi_pct_register));
217 217
218 end: 218 end:
219 acpi_os_free(buffer.pointer); 219 kfree(buffer.pointer);
220 220
221 return result; 221 return result;
222} 222}
@@ -294,7 +294,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
294 } 294 }
295 295
296 end: 296 end:
297 acpi_os_free(buffer.pointer); 297 kfree(buffer.pointer);
298 298
299 return result; 299 return result;
300} 300}
@@ -592,7 +592,7 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
592 } 592 }
593 593
594end: 594end:
595 acpi_os_free(buffer.pointer); 595 kfree(buffer.pointer);
596 return result; 596 return result;
597} 597}
598 598
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 861ac378ce42..5fcb50c7b778 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -319,7 +319,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
319 goto end; 319 goto end;
320 } 320 }
321 321
322 acpi_os_free(buffer.pointer); 322 kfree(buffer.pointer);
323 323
324 device->wakeup.flags.valid = 1; 324 device->wakeup.flags.valid = 1;
325 /* Power button, Lid switch always enable wakeup */ 325 /* Power button, Lid switch always enable wakeup */
@@ -854,7 +854,7 @@ static void acpi_device_set_id(struct acpi_device *device,
854 printk(KERN_ERR "Memory allocation error\n"); 854 printk(KERN_ERR "Memory allocation error\n");
855 } 855 }
856 856
857 acpi_os_free(buffer.pointer); 857 kfree(buffer.pointer);
858} 858}
859 859
860static int acpi_device_set_context(struct acpi_device *device, int type) 860static int acpi_device_set_context(struct acpi_device *device, int type)
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index c90bd2f70b3f..c3bb7faad75e 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -86,7 +86,7 @@ acpi_system_read_dsdt(struct file *file,
86 86
87 res = simple_read_from_buffer(buffer, count, ppos, 87 res = simple_read_from_buffer(buffer, count, ppos,
88 dsdt.pointer, dsdt.length); 88 dsdt.pointer, dsdt.length);
89 acpi_os_free(dsdt.pointer); 89 kfree(dsdt.pointer);
90 90
91 return res; 91 return res;
92} 92}
@@ -113,7 +113,7 @@ acpi_system_read_fadt(struct file *file,
113 113
114 res = simple_read_from_buffer(buffer, count, ppos, 114 res = simple_read_from_buffer(buffer, count, ppos,
115 fadt.pointer, fadt.length); 115 fadt.pointer, fadt.length);
116 acpi_os_free(fadt.pointer); 116 kfree(fadt.pointer);
117 117
118 return res; 118 return res;
119} 119}
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index 7940fc1bd69e..5cff17dc78b3 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -166,10 +166,10 @@ acpi_status acpi_ut_delete_caches(void)
166 166
167 /* Free memory lists */ 167 /* Free memory lists */
168 168
169 acpi_os_free(acpi_gbl_global_list); 169 ACPI_FREE(acpi_gbl_global_list);
170 acpi_gbl_global_list = NULL; 170 acpi_gbl_global_list = NULL;
171 171
172 acpi_os_free(acpi_gbl_ns_node_list); 172 ACPI_FREE(acpi_gbl_ns_node_list);
173 acpi_gbl_ns_node_list = NULL; 173 acpi_gbl_ns_node_list = NULL;
174#endif 174#endif
175 175
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c
index 56270a30718a..1a1f8109159c 100644
--- a/drivers/acpi/utilities/utcache.c
+++ b/drivers/acpi/utilities/utcache.c
@@ -162,7 +162,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)
162 162
163 /* Now we can delete the cache object */ 163 /* Now we can delete the cache object */
164 164
165 acpi_os_free(cache); 165 ACPI_FREE(cache);
166 return (AE_OK); 166 return (AE_OK);
167} 167}
168 168
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 1930e1a75b22..f48227f4c8c9 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -332,7 +332,7 @@ acpi_evaluate_string(acpi_handle handle,
332 332
333 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%s]\n", *data)); 333 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%s]\n", *data));
334 334
335 acpi_os_free(buffer.pointer); 335 kfree(buffer.pointer);
336 336
337 return AE_OK; 337 return AE_OK;
338} 338}
@@ -418,7 +418,7 @@ acpi_evaluate_reference(acpi_handle handle,
418 //kfree(list->handles); 418 //kfree(list->handles);
419 } 419 }
420 420
421 acpi_os_free(buffer.pointer); 421 kfree(buffer.pointer);
422 422
423 return status; 423 return status;
424} 424}
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 9feb633087a9..1f3ffb353299 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1450,7 +1450,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1450 video->attached_array = active_device_list; 1450 video->attached_array = active_device_list;
1451 video->attached_count = count; 1451 video->attached_count = count;
1452 out: 1452 out:
1453 acpi_os_free(buffer.pointer); 1453 kfree(buffer.pointer);
1454 return status; 1454 return status;
1455} 1455}
1456 1456