aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_memhotplug.c6
-rw-r--r--drivers/acpi/asus_acpi.c6
-rw-r--r--drivers/acpi/battery.c4
-rw-r--r--drivers/acpi/bus.c2
-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/numa.c1
-rw-r--r--drivers/acpi/osl.c10
-rw-r--r--drivers/acpi/pci_irq.c1
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/acpi/processor_perflib.c6
-rw-r--r--drivers/acpi/scan.c6
-rw-r--r--drivers/acpi/system.c4
-rw-r--r--drivers/acpi/tables.c1
-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
19 files changed, 31 insertions, 42 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 97863143d21d..81e970adeab3 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -248,7 +248,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
248 num_enabled++; 248 num_enabled++;
249 } 249 }
250 if (!num_enabled) { 250 if (!num_enabled) {
251 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); 251 printk(KERN_ERR PREFIX "add_memory failed\n");
252 mem_device->state = MEMORY_INVALID_STATE; 252 mem_device->state = MEMORY_INVALID_STATE;
253 return -EINVAL; 253 return -EINVAL;
254 } 254 }
@@ -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 6ce93306dd37..2b8aab560b58 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/bus.c b/drivers/acpi/bus.c
index dec044c04273..ea5a0496a4fd 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -192,7 +192,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
192 /* Make sure this is a valid target state */ 192 /* Make sure this is a valid target state */
193 193
194 if (!device->flags.power_manageable) { 194 if (!device->flags.power_manageable) {
195 printk(KERN_DEBUG "Device `[%s]is not power manageable", 195 printk(KERN_DEBUG "Device `[%s]' is not power manageable",
196 device->kobj.name); 196 device->kobj.name);
197 return -ENODEV; 197 return -ENODEV;
198 } 198 }
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/numa.c b/drivers/acpi/numa.c
index 13d6d5bdea26..4d622981f61a 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/types.h> 28#include <linux/types.h>
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index afd937b158b3..d4bd314d60ba 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
@@ -147,13 +146,6 @@ void *acpi_os_allocate(acpi_size size)
147 return kmalloc(size, GFP_KERNEL); 146 return kmalloc(size, GFP_KERNEL);
148} 147}
149 148
150void acpi_os_free(void *ptr)
151{
152 kfree(ptr);
153}
154
155EXPORT_SYMBOL(acpi_os_free);
156
157acpi_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)
158{ 150{
159 if (efi_enabled) { 151 if (efi_enabled) {
@@ -743,7 +735,7 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
743 735
744 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle)); 736 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
745 737
746 acpi_os_free(sem); 738 kfree(sem);
747 sem = NULL; 739 sem = NULL;
748 740
749 return AE_OK; 741 return AE_OK;
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index fb96e3bf969b..feda0341f5a7 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -24,7 +24,6 @@
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 */ 25 */
26 26
27#include <linux/config.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/module.h> 29#include <linux/module.h>
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 401e723e6c66..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)
@@ -1433,7 +1433,7 @@ static int acpi_device_resume(struct device * dev)
1433} 1433}
1434 1434
1435 1435
1436struct bus_type acpi_bus_type = { 1436static struct bus_type acpi_bus_type = {
1437 .name = "acpi", 1437 .name = "acpi",
1438 .suspend = acpi_device_suspend, 1438 .suspend = acpi_device_suspend,
1439 .resume = acpi_device_resume, 1439 .resume = acpi_device_resume,
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/tables.c b/drivers/acpi/tables.c
index ed5e8816d83d..bfb3bfcf9e91 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
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 7459ca52c1a8..56666a982476 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1446,7 +1446,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1446 video->attached_array = active_device_list; 1446 video->attached_array = active_device_list;
1447 video->attached_count = count; 1447 video->attached_count = count;
1448 out: 1448 out:
1449 acpi_os_free(buffer.pointer); 1449 kfree(buffer.pointer);
1450 return status; 1450 return status;
1451} 1451}
1452 1452