aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2006-06-26 23:58:43 -0400
committerLen Brown <len.brown@intel.com>2006-06-26 23:58:43 -0400
commita6fc67202e0224e6c9d1d285cc0b444bce887ed5 (patch)
treecb2d422f65c0ab0a95f452f6bac80e2bfdd547de
parenteb99adde31b7d85c67a5e1c2fa5e098e1056dd79 (diff)
ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/ac.c12
-rw-r--r--drivers/acpi/acpi_memhotplug.c67
-rw-r--r--drivers/acpi/battery.c31
-rw-r--r--drivers/acpi/bus.c22
-rw-r--r--drivers/acpi/button.c18
-rw-r--r--drivers/acpi/container.c2
-rw-r--r--drivers/acpi/debug.c5
-rw-r--r--drivers/acpi/ec.c17
-rw-r--r--drivers/acpi/event.c5
-rw-r--r--drivers/acpi/fan.c7
-rw-r--r--drivers/acpi/hotkey.c38
-rw-r--r--drivers/acpi/osl.c9
-rw-r--r--drivers/acpi/pci_bind.c50
-rw-r--r--drivers/acpi/pci_irq.c20
-rw-r--r--drivers/acpi/pci_link.c90
-rw-r--r--drivers/acpi/pci_root.c15
-rw-r--r--drivers/acpi/power.c22
-rw-r--r--drivers/acpi/processor_core.c56
-rw-r--r--drivers/acpi/processor_idle.c14
-rw-r--r--drivers/acpi/processor_perflib.c37
-rw-r--r--drivers/acpi/processor_thermal.c11
-rw-r--r--drivers/acpi/processor_throttling.c2
-rw-r--r--drivers/acpi/scan.c7
-rw-r--r--drivers/acpi/system.c3
-rw-r--r--drivers/acpi/thermal.c58
-rw-r--r--drivers/acpi/utils.c50
-rw-r--r--drivers/acpi/video.c50
27 files changed, 273 insertions, 445 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 7839b831df94..95223d8c5ecc 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -91,8 +91,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
91 91
92 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); 92 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
93 if (ACPI_FAILURE(status)) { 93 if (ACPI_FAILURE(status)) {
94 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 94 ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
95 "Error reading AC Adapter state\n"));
96 ac->state = ACPI_AC_STATUS_UNKNOWN; 95 ac->state = ACPI_AC_STATUS_UNKNOWN;
97 return_VALUE(-ENODEV); 96 return_VALUE(-ENODEV);
98 } 97 }
@@ -159,9 +158,7 @@ static int acpi_ac_add_fs(struct acpi_device *device)
159 entry = create_proc_entry(ACPI_AC_FILE_STATE, 158 entry = create_proc_entry(ACPI_AC_FILE_STATE,
160 S_IRUGO, acpi_device_dir(device)); 159 S_IRUGO, acpi_device_dir(device));
161 if (!entry) 160 if (!entry)
162 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 161 return_VALUE(-ENODEV);
163 "Unable to create '%s' fs entry\n",
164 ACPI_AC_FILE_STATE));
165 else { 162 else {
166 entry->proc_fops = &acpi_ac_fops; 163 entry->proc_fops = &acpi_ac_fops;
167 entry->data = acpi_driver_data(device); 164 entry->data = acpi_driver_data(device);
@@ -249,8 +246,6 @@ static int acpi_ac_add(struct acpi_device *device)
249 ACPI_DEVICE_NOTIFY, acpi_ac_notify, 246 ACPI_DEVICE_NOTIFY, acpi_ac_notify,
250 ac); 247 ac);
251 if (ACPI_FAILURE(status)) { 248 if (ACPI_FAILURE(status)) {
252 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
253 "Error installing notify handler\n"));
254 result = -ENODEV; 249 result = -ENODEV;
255 goto end; 250 goto end;
256 } 251 }
@@ -282,9 +277,6 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
282 277
283 status = acpi_remove_notify_handler(ac->handle, 278 status = acpi_remove_notify_handler(ac->handle,
284 ACPI_DEVICE_NOTIFY, acpi_ac_notify); 279 ACPI_DEVICE_NOTIFY, acpi_ac_notify);
285 if (ACPI_FAILURE(status))
286 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
287 "Error removing notify handler\n"));
288 280
289 acpi_ac_remove_fs(device); 281 acpi_ac_remove_fs(device);
290 282
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index e0a95ba72371..e49d327ccf4c 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -125,15 +125,14 @@ acpi_memory_get_device(acpi_handle handle,
125 125
126 status = acpi_get_parent(handle, &phandle); 126 status = acpi_get_parent(handle, &phandle);
127 if (ACPI_FAILURE(status)) { 127 if (ACPI_FAILURE(status)) {
128 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_get_parent\n")); 128 ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent"));
129 return_VALUE(-EINVAL); 129 return_VALUE(-EINVAL);
130 } 130 }
131 131
132 /* Get the parent device */ 132 /* Get the parent device */
133 status = acpi_bus_get_device(phandle, &pdevice); 133 status = acpi_bus_get_device(phandle, &pdevice);
134 if (ACPI_FAILURE(status)) { 134 if (ACPI_FAILURE(status)) {
135 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 135 ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device"));
136 "Error in acpi_bus_get_device\n"));
137 return_VALUE(-EINVAL); 136 return_VALUE(-EINVAL);
138 } 137 }
139 138
@@ -143,7 +142,7 @@ acpi_memory_get_device(acpi_handle handle,
143 */ 142 */
144 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); 143 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
145 if (ACPI_FAILURE(status)) { 144 if (ACPI_FAILURE(status)) {
146 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n")); 145 ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus"));
147 return_VALUE(-EINVAL); 146 return_VALUE(-EINVAL);
148 } 147 }
149 148
@@ -188,8 +187,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
188 /* Get the range from the _CRS */ 187 /* Get the range from the _CRS */
189 result = acpi_memory_get_device_resources(mem_device); 188 result = acpi_memory_get_device_resources(mem_device);
190 if (result) { 189 if (result) {
191 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 190 ACPI_ERROR((AE_INFO, "get_device_resources failed"));
192 "\nget_device_resources failed\n"));
193 mem_device->state = MEMORY_INVALID_STATE; 191 mem_device->state = MEMORY_INVALID_STATE;
194 return result; 192 return result;
195 } 193 }
@@ -200,7 +198,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
200 */ 198 */
201 result = add_memory(mem_device->start_addr, mem_device->length); 199 result = add_memory(mem_device->start_addr, mem_device->length);
202 if (result) { 200 if (result) {
203 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); 201 ACPI_ERROR((AE_INFO, "add_memory failed"));
204 mem_device->state = MEMORY_INVALID_STATE; 202 mem_device->state = MEMORY_INVALID_STATE;
205 return result; 203 return result;
206 } 204 }
@@ -226,7 +224,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
226 "_EJ0", &arg_list, NULL); 224 "_EJ0", &arg_list, NULL);
227 /* Return on _EJ0 failure */ 225 /* Return on _EJ0 failure */
228 if (ACPI_FAILURE(status)) { 226 if (ACPI_FAILURE(status)) {
229 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_EJ0 failed.\n")); 227 ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed"));
230 return_VALUE(-ENODEV); 228 return_VALUE(-ENODEV);
231 } 229 }
232 230
@@ -256,16 +254,12 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
256 * Note: Assume that this function returns zero on success 254 * Note: Assume that this function returns zero on success
257 */ 255 */
258 result = remove_memory(start, len); 256 result = remove_memory(start, len);
259 if (result) { 257 if (result)
260 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove failed.\n"));
261 return_VALUE(result); 258 return_VALUE(result);
262 }
263 259
264 /* Power-off and eject the device */ 260 /* Power-off and eject the device */
265 result = acpi_memory_powerdown_device(mem_device); 261 result = acpi_memory_powerdown_device(mem_device);
266 if (result) { 262 if (result) {
267 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
268 "Device Power Down failed.\n"));
269 /* Set the status of the device to invalid */ 263 /* Set the status of the device to invalid */
270 mem_device->state = MEMORY_INVALID_STATE; 264 mem_device->state = MEMORY_INVALID_STATE;
271 return result; 265 return result;
@@ -292,15 +286,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
292 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 286 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
293 "\nReceived DEVICE CHECK notification for device\n")); 287 "\nReceived DEVICE CHECK notification for device\n"));
294 if (acpi_memory_get_device(handle, &mem_device)) { 288 if (acpi_memory_get_device(handle, &mem_device)) {
295 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 289 ACPI_ERROR((AE_INFO, "Cannot find driver data"));
296 "Error in finding driver data\n"));
297 return_VOID; 290 return_VOID;
298 } 291 }
299 292
300 if (!acpi_memory_check_device(mem_device)) { 293 if (!acpi_memory_check_device(mem_device)) {
301 if (acpi_memory_enable_device(mem_device)) 294 if (acpi_memory_enable_device(mem_device))
302 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 295 ACPI_ERROR((AE_INFO,
303 "Error in acpi_memory_enable_device\n")); 296 "Cannot enable memory device"));
304 } 297 }
305 break; 298 break;
306 case ACPI_NOTIFY_EJECT_REQUEST: 299 case ACPI_NOTIFY_EJECT_REQUEST:
@@ -308,14 +301,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
308 "\nReceived EJECT REQUEST notification for device\n")); 301 "\nReceived EJECT REQUEST notification for device\n"));
309 302
310 if (acpi_bus_get_device(handle, &device)) { 303 if (acpi_bus_get_device(handle, &device)) {
311 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 304 ACPI_ERROR((AE_INFO, "Device doesn't exist"));
312 "Device doesn't exist\n"));
313 break; 305 break;
314 } 306 }
315 mem_device = acpi_driver_data(device); 307 mem_device = acpi_driver_data(device);
316 if (!mem_device) { 308 if (!mem_device) {
317 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 309 ACPI_ERROR((AE_INFO, "Driver Data is NULL"));
318 "Driver Data is NULL\n"));
319 break; 310 break;
320 } 311 }
321 312
@@ -326,8 +317,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
326 * with generic sysfs driver 317 * with generic sysfs driver
327 */ 318 */
328 if (acpi_memory_disable_device(mem_device)) 319 if (acpi_memory_disable_device(mem_device))
329 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 320 ACPI_ERROR((AE_INFO,
330 "Error in acpi_memory_disable_device\n")); 321 "Disable memory device\n"));
331 /* 322 /*
332 * TBD: Invoke acpi_bus_remove to cleanup data structures 323 * TBD: Invoke acpi_bus_remove to cleanup data structures
333 */ 324 */
@@ -405,7 +396,7 @@ static acpi_status is_memory_device(acpi_handle handle)
405 396
406 status = acpi_get_object_info(handle, &buffer); 397 status = acpi_get_object_info(handle, &buffer);
407 if (ACPI_FAILURE(status)) 398 if (ACPI_FAILURE(status))
408 return_ACPI_STATUS(AE_ERROR); 399 return_ACPI_STATUS(status);
409 400
410 info = buffer.pointer; 401 info = buffer.pointer;
411 if (!(info->valid & ACPI_VALID_HID)) { 402 if (!(info->valid & ACPI_VALID_HID)) {
@@ -431,18 +422,15 @@ acpi_memory_register_notify_handler(acpi_handle handle,
431 ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler"); 422 ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler");
432 423
433 status = is_memory_device(handle); 424 status = is_memory_device(handle);
434 if (ACPI_FAILURE(status)) 425 if (ACPI_FAILURE(status)){
426 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device"));
435 return_ACPI_STATUS(AE_OK); /* continue */ 427 return_ACPI_STATUS(AE_OK); /* continue */
428 }
436 429
437 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, 430 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
438 acpi_memory_device_notify, NULL); 431 acpi_memory_device_notify, NULL);
439 if (ACPI_FAILURE(status)) { 432 /* continue */
440 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 433 return_ACPI_STATUS(AE_OK);
441 "Error installing notify handler\n"));
442 return_ACPI_STATUS(AE_OK); /* continue */
443 }
444
445 return_ACPI_STATUS(status);
446} 434}
447 435
448static acpi_status 436static acpi_status
@@ -454,19 +442,16 @@ acpi_memory_deregister_notify_handler(acpi_handle handle,
454 ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler"); 442 ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler");
455 443
456 status = is_memory_device(handle); 444 status = is_memory_device(handle);
457 if (ACPI_FAILURE(status)) 445 if (ACPI_FAILURE(status)){
446 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device"));
458 return_ACPI_STATUS(AE_OK); /* continue */ 447 return_ACPI_STATUS(AE_OK); /* continue */
448 }
459 449
460 status = acpi_remove_notify_handler(handle, 450 status = acpi_remove_notify_handler(handle,
461 ACPI_SYSTEM_NOTIFY, 451 ACPI_SYSTEM_NOTIFY,
462 acpi_memory_device_notify); 452 acpi_memory_device_notify);
463 if (ACPI_FAILURE(status)) {
464 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
465 "Error removing notify handler\n"));
466 return_ACPI_STATUS(AE_OK); /* continue */
467 }
468 453
469 return_ACPI_STATUS(status); 454 return_ACPI_STATUS(AE_OK); /* continue */
470} 455}
471 456
472static int __init acpi_memory_device_init(void) 457static int __init acpi_memory_device_init(void)
@@ -487,7 +472,7 @@ static int __init acpi_memory_device_init(void)
487 NULL, NULL); 472 NULL, NULL);
488 473
489 if (ACPI_FAILURE(status)) { 474 if (ACPI_FAILURE(status)) {
490 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); 475 ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed"));
491 acpi_bus_unregister_driver(&acpi_memory_device_driver); 476 acpi_bus_unregister_driver(&acpi_memory_device_driver);
492 return_VALUE(-ENODEV); 477 return_VALUE(-ENODEV);
493 } 478 }
@@ -511,7 +496,7 @@ static void __exit acpi_memory_device_exit(void)
511 NULL, NULL); 496 NULL, NULL);
512 497
513 if (ACPI_FAILURE(status)) 498 if (ACPI_FAILURE(status))
514 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); 499 ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed"));
515 500
516 acpi_bus_unregister_driver(&acpi_memory_device_driver); 501 acpi_bus_unregister_driver(&acpi_memory_device_driver);
517 502
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 702e857e98c5..3b92c94ebc60 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -141,7 +141,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
141 141
142 status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); 142 status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer);
143 if (ACPI_FAILURE(status)) { 143 if (ACPI_FAILURE(status)) {
144 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BIF\n")); 144 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
145 return_VALUE(-ENODEV); 145 return_VALUE(-ENODEV);
146 } 146 }
147 147
@@ -151,7 +151,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
151 151
152 status = acpi_extract_package(package, &format, &data); 152 status = acpi_extract_package(package, &format, &data);
153 if (status != AE_BUFFER_OVERFLOW) { 153 if (status != AE_BUFFER_OVERFLOW) {
154 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); 154 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF"));
155 result = -ENODEV; 155 result = -ENODEV;
156 goto end; 156 goto end;
157 } 157 }
@@ -165,7 +165,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
165 165
166 status = acpi_extract_package(package, &format, &data); 166 status = acpi_extract_package(package, &format, &data);
167 if (ACPI_FAILURE(status)) { 167 if (ACPI_FAILURE(status)) {
168 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); 168 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF"));
169 kfree(data.pointer); 169 kfree(data.pointer);
170 result = -ENODEV; 170 result = -ENODEV;
171 goto end; 171 goto end;
@@ -202,7 +202,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
202 202
203 status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); 203 status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer);
204 if (ACPI_FAILURE(status)) { 204 if (ACPI_FAILURE(status)) {
205 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BST\n")); 205 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
206 return_VALUE(-ENODEV); 206 return_VALUE(-ENODEV);
207 } 207 }
208 208
@@ -212,7 +212,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
212 212
213 status = acpi_extract_package(package, &format, &data); 213 status = acpi_extract_package(package, &format, &data);
214 if (status != AE_BUFFER_OVERFLOW) { 214 if (status != AE_BUFFER_OVERFLOW) {
215 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); 215 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST"));
216 result = -ENODEV; 216 result = -ENODEV;
217 goto end; 217 goto end;
218 } 218 }
@@ -226,7 +226,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
226 226
227 status = acpi_extract_package(package, &format, &data); 227 status = acpi_extract_package(package, &format, &data);
228 if (ACPI_FAILURE(status)) { 228 if (ACPI_FAILURE(status)) {
229 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); 229 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST"));
230 kfree(data.pointer); 230 kfree(data.pointer);
231 result = -ENODEV; 231 result = -ENODEV;
232 goto end; 232 goto end;
@@ -458,8 +458,6 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
458 if ((bst->state & 0x01) && (bst->state & 0x02)) { 458 if ((bst->state & 0x01) && (bst->state & 0x02)) {
459 seq_printf(seq, 459 seq_printf(seq,
460 "charging state: charging/discharging\n"); 460 "charging state: charging/discharging\n");
461 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
462 "Battery Charging and Discharging?\n"));
463 } else if (bst->state & 0x01) 461 } else if (bst->state & 0x01)
464 seq_printf(seq, "charging state: discharging\n"); 462 seq_printf(seq, "charging state: discharging\n");
465 else if (bst->state & 0x02) 463 else if (bst->state & 0x02)
@@ -609,9 +607,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
609 entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, 607 entry = create_proc_entry(ACPI_BATTERY_FILE_INFO,
610 S_IRUGO, acpi_device_dir(device)); 608 S_IRUGO, acpi_device_dir(device));
611 if (!entry) 609 if (!entry)
612 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 610 return_VALUE(-ENODEV);
613 "Unable to create '%s' fs entry\n",
614 ACPI_BATTERY_FILE_INFO));
615 else { 611 else {
616 entry->proc_fops = &acpi_battery_info_ops; 612 entry->proc_fops = &acpi_battery_info_ops;
617 entry->data = acpi_driver_data(device); 613 entry->data = acpi_driver_data(device);
@@ -622,9 +618,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
622 entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, 618 entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS,
623 S_IRUGO, acpi_device_dir(device)); 619 S_IRUGO, acpi_device_dir(device));
624 if (!entry) 620 if (!entry)
625 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 621 return_VALUE(-ENODEV);
626 "Unable to create '%s' fs entry\n",
627 ACPI_BATTERY_FILE_STATUS));
628 else { 622 else {
629 entry->proc_fops = &acpi_battery_state_ops; 623 entry->proc_fops = &acpi_battery_state_ops;
630 entry->data = acpi_driver_data(device); 624 entry->data = acpi_driver_data(device);
@@ -636,9 +630,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
636 S_IFREG | S_IRUGO | S_IWUSR, 630 S_IFREG | S_IRUGO | S_IWUSR,
637 acpi_device_dir(device)); 631 acpi_device_dir(device));
638 if (!entry) 632 if (!entry)
639 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 633 return_VALUE(-ENODEV);
640 "Unable to create '%s' fs entry\n",
641 ACPI_BATTERY_FILE_ALARM));
642 else { 634 else {
643 entry->proc_fops = &acpi_battery_alarm_ops; 635 entry->proc_fops = &acpi_battery_alarm_ops;
644 entry->data = acpi_driver_data(device); 636 entry->data = acpi_driver_data(device);
@@ -732,8 +724,6 @@ static int acpi_battery_add(struct acpi_device *device)
732 ACPI_DEVICE_NOTIFY, 724 ACPI_DEVICE_NOTIFY,
733 acpi_battery_notify, battery); 725 acpi_battery_notify, battery);
734 if (ACPI_FAILURE(status)) { 726 if (ACPI_FAILURE(status)) {
735 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
736 "Error installing notify handler\n"));
737 result = -ENODEV; 727 result = -ENODEV;
738 goto end; 728 goto end;
739 } 729 }
@@ -766,9 +756,6 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
766 status = acpi_remove_notify_handler(battery->handle, 756 status = acpi_remove_notify_handler(battery->handle,
767 ACPI_DEVICE_NOTIFY, 757 ACPI_DEVICE_NOTIFY,
768 acpi_battery_notify); 758 acpi_battery_notify);
769 if (ACPI_FAILURE(status))
770 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
771 "Error removing notify handler\n"));
772 759
773 acpi_battery_remove_fs(device); 760 acpi_battery_remove_fs(device);
774 761
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index dd3983cece92..917bf2397b22 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -69,8 +69,7 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
69 69
70 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); 70 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
71 if (ACPI_FAILURE(status) || !*device) { 71 if (ACPI_FAILURE(status) || !*device) {
72 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n", 72 ACPI_EXCEPTION((AE_INFO, status, "No context for object [%p]", handle));
73 handle));
74 return_VALUE(-ENODEV); 73 return_VALUE(-ENODEV);
75 } 74 }
76 75
@@ -197,8 +196,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
197 /* Make sure this is a valid target state */ 196 /* Make sure this is a valid target state */
198 197
199 if (!device->flags.power_manageable) { 198 if (!device->flags.power_manageable) {
200 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 199 ACPI_INFO((AE_INFO, "Device is not power manageable"));
201 "Device is not power manageable\n"));
202 return_VALUE(-ENODEV); 200 return_VALUE(-ENODEV);
203 } 201 }
204 /* 202 /*
@@ -215,13 +213,13 @@ int acpi_bus_set_power(acpi_handle handle, int state)
215 } 213 }
216 } 214 }
217 if (!device->power.states[state].flags.valid) { 215 if (!device->power.states[state].flags.valid) {
218 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", 216 ACPI_WARNING((AE_INFO, "Device does not support D%d", state));
219 state));
220 return_VALUE(-ENODEV); 217 return_VALUE(-ENODEV);
221 } 218 }
222 if (device->parent && (state < device->parent->power.state)) { 219 if (device->parent && (state < device->parent->power.state)) {
223 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 220 ACPI_WARNING((AE_INFO,
224 "Cannot set device to a higher-powered state than parent\n")); 221 "Cannot set device to a higher-powered"
222 " state than parent"));
225 return_VALUE(-ENODEV); 223 return_VALUE(-ENODEV);
226 } 224 }
227 225
@@ -264,9 +262,9 @@ int acpi_bus_set_power(acpi_handle handle, int state)
264 262
265 end: 263 end:
266 if (result) 264 if (result)
267 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 265 ACPI_WARNING((AE_INFO,
268 "Error transitioning device [%s] to D%d\n", 266 "Transitioning device [%s] to D%d",
269 device->pnp.bus_id, state)); 267 device->pnp.bus_id, state));
270 else 268 else
271 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 269 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
272 "Device [%s] transitioned to D%d\n", 270 "Device [%s] transitioned to D%d\n",
@@ -581,7 +579,7 @@ static int __init acpi_bus_init_irq(void)
581 579
582 status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); 580 status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL);
583 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 581 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
584 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PIC\n")); 582 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC"));
585 return_VALUE(-ENODEV); 583 return_VALUE(-ENODEV);
586 } 584 }
587 585
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 4b6d9f0096a1..a8717da32a7a 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -207,9 +207,7 @@ static int acpi_button_add_fs(struct acpi_device *device)
207 entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, 207 entry = create_proc_entry(ACPI_BUTTON_FILE_INFO,
208 S_IRUGO, acpi_device_dir(device)); 208 S_IRUGO, acpi_device_dir(device));
209 if (!entry) 209 if (!entry)
210 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 210 return_VALUE(-ENODEV);
211 "Unable to create '%s' fs entry\n",
212 ACPI_BUTTON_FILE_INFO));
213 else { 211 else {
214 entry->proc_fops = &acpi_button_info_fops; 212 entry->proc_fops = &acpi_button_info_fops;
215 entry->data = acpi_driver_data(device); 213 entry->data = acpi_driver_data(device);
@@ -221,9 +219,7 @@ static int acpi_button_add_fs(struct acpi_device *device)
221 entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, 219 entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
222 S_IRUGO, acpi_device_dir(device)); 220 S_IRUGO, acpi_device_dir(device));
223 if (!entry) 221 if (!entry)
224 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 222 return -ENODEV;
225 "Unable to create '%s' fs entry\n",
226 ACPI_BUTTON_FILE_INFO));
227 else { 223 else {
228 entry->proc_fops = &acpi_button_state_fops; 224 entry->proc_fops = &acpi_button_state_fops;
229 entry->data = acpi_driver_data(device); 225 entry->data = acpi_driver_data(device);
@@ -349,8 +345,8 @@ static int acpi_button_add(struct acpi_device *device)
349 sprintf(acpi_device_class(device), "%s/%s", 345 sprintf(acpi_device_class(device), "%s/%s",
350 ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); 346 ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
351 } else { 347 } else {
352 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", 348 ACPI_ERROR((AE_INFO, "Unsupported hid [%s]",
353 acpi_device_hid(device))); 349 acpi_device_hid(device)));
354 result = -ENODEV; 350 result = -ENODEV;
355 goto end; 351 goto end;
356 } 352 }
@@ -381,8 +377,6 @@ static int acpi_button_add(struct acpi_device *device)
381 } 377 }
382 378
383 if (ACPI_FAILURE(status)) { 379 if (ACPI_FAILURE(status)) {
384 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
385 "Error installing notify handler\n"));
386 result = -ENODEV; 380 result = -ENODEV;
387 goto end; 381 goto end;
388 } 382 }
@@ -440,10 +434,6 @@ static int acpi_button_remove(struct acpi_device *device, int type)
440 break; 434 break;
441 } 435 }
442 436
443 if (ACPI_FAILURE(status))
444 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
445 "Error removing notify handler\n"));
446
447 acpi_button_remove_fs(device); 437 acpi_button_remove_fs(device);
448 438
449 kfree(button); 439 kfree(button);
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index b69a8cad82b7..53625fc3d715 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -94,7 +94,7 @@ static int acpi_container_add(struct acpi_device *device)
94 ACPI_FUNCTION_TRACE("acpi_container_add"); 94 ACPI_FUNCTION_TRACE("acpi_container_add");
95 95
96 if (!device) { 96 if (!device) {
97 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n")); 97 ACPI_ERROR((AE_INFO, "device is NULL"));
98 return_VALUE(-EINVAL); 98 return_VALUE(-EINVAL);
99 } 99 }
100 100
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
index 263322b7d113..ec7bcee77085 100644
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -216,12 +216,9 @@ static int __init acpi_debug_init(void)
216 return_VALUE(error); 216 return_VALUE(error);
217 217
218 Error: 218 Error:
219 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
220 "Unable to create '%s' proc fs entry\n", name));
221
222 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir); 219 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir);
223 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); 220 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir);
224 error = -EFAULT; 221 error = -ENODEV;
225 goto Done; 222 goto Done;
226} 223}
227 224
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 18b3ea9dace2..94cc8ab94006 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -279,7 +279,7 @@ int acpi_ec_enter_burst_mode(union acpi_ec *ec)
279 atomic_set(&ec->intr.leaving_burst, 0); 279 atomic_set(&ec->intr.leaving_burst, 0);
280 return_VALUE(0); 280 return_VALUE(0);
281 end: 281 end:
282 printk(KERN_WARNING PREFIX "Error in acpi_ec_wait\n"); 282 ACPI_EXCEPTION ((AE_INFO, status, "EC wait, burst mode");
283 return_VALUE(-1); 283 return_VALUE(-1);
284} 284}
285 285
@@ -300,7 +300,7 @@ int acpi_ec_leave_burst_mode(union acpi_ec *ec)
300 atomic_set(&ec->intr.leaving_burst, 1); 300 atomic_set(&ec->intr.leaving_burst, 1);
301 return_VALUE(0); 301 return_VALUE(0);
302end: 302end:
303 printk(KERN_WARNING PREFIX "leave burst_mode:error\n"); 303 ACPI_EXCEPTION((AE_INFO, status, "EC leave burst mode");
304 return_VALUE(-1); 304 return_VALUE(-1);
305} 305}
306#endif /* ACPI_FUTURE_USAGE */ 306#endif /* ACPI_FUTURE_USAGE */
@@ -963,9 +963,7 @@ static int acpi_ec_add_fs(struct acpi_device *device)
963 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO, 963 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO,
964 acpi_device_dir(device)); 964 acpi_device_dir(device));
965 if (!entry) 965 if (!entry)
966 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 966 return_VALUE(-ENODEV);
967 "Unable to create '%s' fs entry\n",
968 ACPI_EC_FILE_INFO));
969 else { 967 else {
970 entry->proc_fops = &acpi_ec_info_ops; 968 entry->proc_fops = &acpi_ec_info_ops;
971 entry->data = acpi_driver_data(device); 969 entry->data = acpi_driver_data(device);
@@ -1038,8 +1036,7 @@ static int acpi_ec_poll_add(struct acpi_device *device)
1038 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, 1036 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
1039 &ec->common.gpe_bit); 1037 &ec->common.gpe_bit);
1040 if (ACPI_FAILURE(status)) { 1038 if (ACPI_FAILURE(status)) {
1041 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1039 ACPI_EXCEPTION((AE_INFO, status, "Obtaining GPE bit"));
1042 "Error obtaining GPE bit assignment\n"));
1043 result = -ENODEV; 1040 result = -ENODEV;
1044 goto end; 1041 goto end;
1045 } 1042 }
@@ -1110,8 +1107,7 @@ static int acpi_ec_intr_add(struct acpi_device *device)
1110 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, 1107 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
1111 &ec->common.gpe_bit); 1108 &ec->common.gpe_bit);
1112 if (ACPI_FAILURE(status)) { 1109 if (ACPI_FAILURE(status)) {
1113 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1110 ACPI_ERROR((AE_INFO, "Obtaining GPE bit assignment"));
1114 "Error obtaining GPE bit assignment\n"));
1115 result = -ENODEV; 1111 result = -ENODEV;
1116 goto end; 1112 goto end;
1117 } 1113 }
@@ -1205,8 +1201,7 @@ static int acpi_ec_start(struct acpi_device *device)
1205 acpi_ec_io_ports, ec); 1201 acpi_ec_io_ports, ec);
1206 if (ACPI_FAILURE(status) 1202 if (ACPI_FAILURE(status)
1207 || ec->common.command_addr.register_bit_width == 0) { 1203 || ec->common.command_addr.register_bit_width == 0) {
1208 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1204 ACPI_ERROR((AE_INFO, "Error getting I/O port addresses"));
1209 "Error getting I/O port addresses"));
1210 return_VALUE(-ENODEV); 1205 return_VALUE(-ENODEV);
1211 } 1206 }
1212 1207
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 2dbb1b0f11d5..dab09d3f6307 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -122,10 +122,7 @@ static int __init acpi_event_init(void)
122 if (entry) 122 if (entry)
123 entry->proc_fops = &acpi_system_event_ops; 123 entry->proc_fops = &acpi_system_event_ops;
124 else { 124 else {
125 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 125 error = -ENODEV;
126 "Unable to create '%s' proc fs entry\n",
127 "event"));
128 error = -EFAULT;
129 } 126 }
130 return_VALUE(error); 127 return_VALUE(error);
131} 128}
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 1cd25784b7a4..c1d470557b9f 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -153,9 +153,7 @@ static int acpi_fan_add_fs(struct acpi_device *device)
153 S_IFREG | S_IRUGO | S_IWUSR, 153 S_IFREG | S_IRUGO | S_IWUSR,
154 acpi_device_dir(device)); 154 acpi_device_dir(device));
155 if (!entry) 155 if (!entry)
156 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 156 return_VALUE(-ENODEV);
157 "Unable to create '%s' fs entry\n",
158 ACPI_FAN_FILE_STATE));
159 else { 157 else {
160 entry->proc_fops = &acpi_fan_state_ops; 158 entry->proc_fops = &acpi_fan_state_ops;
161 entry->data = acpi_driver_data(device); 159 entry->data = acpi_driver_data(device);
@@ -205,8 +203,7 @@ static int acpi_fan_add(struct acpi_device *device)
205 203
206 result = acpi_bus_get_power(fan->handle, &state); 204 result = acpi_bus_get_power(fan->handle, &state);
207 if (result) { 205 if (result) {
208 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 206 ACPI_ERROR((AE_INFO, "Reading power state"));
209 "Error reading power state\n"));
210 goto end; 207 goto end;
211 } 208 }
212 209
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index c25b2b92edcf..37dcb1f7f983 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -356,9 +356,6 @@ static int create_polling_proc(union acpi_hotkey *device)
356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); 356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir);
357 357
358 if (!proc) { 358 if (!proc) {
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
360 "Hotkey: Unable to create %s entry\n",
361 device->poll_hotkey.poll_method));
362 return_VALUE(-ENODEV); 359 return_VALUE(-ENODEV);
363 } else { 360 } else {
364 proc->proc_fops = &hotkey_polling_fops; 361 proc->proc_fops = &hotkey_polling_fops;
@@ -771,7 +768,7 @@ static ssize_t hotkey_write_config(struct file *file,
771 768
772 if (copy_from_user(config_record, buffer, count)) { 769 if (copy_from_user(config_record, buffer, count)) {
773 kfree(config_record); 770 kfree(config_record);
774 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data \n")); 771 ACPI_ERROR((AE_INFO, "Invalid data"));
775 return_VALUE(-EINVAL); 772 return_VALUE(-EINVAL);
776 } 773 }
777 config_record[count] = 0; 774 config_record[count] = 0;
@@ -792,8 +789,7 @@ static ssize_t hotkey_write_config(struct file *file,
792 kfree(bus_method); 789 kfree(bus_method);
793 kfree(action_handle); 790 kfree(action_handle);
794 kfree(method); 791 kfree(method);
795 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 792 ACPI_ERROR((AE_INFO, "Invalid data format ret=%d", ret));
796 "Invalid data format ret=%d\n", ret));
797 return_VALUE(-EINVAL); 793 return_VALUE(-EINVAL);
798 } 794 }
799 795
@@ -806,7 +802,7 @@ static ssize_t hotkey_write_config(struct file *file,
806 tmp = get_hotkey_by_event(&global_hotkey_list, 802 tmp = get_hotkey_by_event(&global_hotkey_list,
807 internal_event_num); 803 internal_event_num);
808 if (!tmp) 804 if (!tmp)
809 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid key")); 805 ACPI_ERROR((AE_INFO, "Invalid key"));
810 else 806 else
811 memcpy(key, tmp, sizeof(union acpi_hotkey)); 807 memcpy(key, tmp, sizeof(union acpi_hotkey));
812 goto cont_cmd; 808 goto cont_cmd;
@@ -828,7 +824,7 @@ static ssize_t hotkey_write_config(struct file *file,
828 else 824 else
829 free_poll_hotkey_buffer(key); 825 free_poll_hotkey_buffer(key);
830 kfree(key); 826 kfree(key);
831 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid hotkey \n")); 827 ACPI_ERROR((AE_INFO, "Invalid hotkey"));
832 return_VALUE(-EINVAL); 828 return_VALUE(-EINVAL);
833 } 829 }
834 830
@@ -862,7 +858,7 @@ static ssize_t hotkey_write_config(struct file *file,
862 else 858 else
863 free_poll_hotkey_buffer(key); 859 free_poll_hotkey_buffer(key);
864 kfree(key); 860 kfree(key);
865 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid key\n")); 861 ACPI_ERROR((AE_INFO, "invalid key"));
866 return_VALUE(-EINVAL); 862 return_VALUE(-EINVAL);
867} 863}
868 864
@@ -907,7 +903,7 @@ static int read_acpi_int(acpi_handle handle, const char *method,
907 val->integer.value = out_obj.integer.value; 903 val->integer.value = out_obj.integer.value;
908 val->type = out_obj.type; 904 val->type = out_obj.type;
909 } else 905 } else
910 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "null val pointer")); 906 ACPI_ERROR((AE_INFO, "null val pointer"));
911 return_VALUE((status == AE_OK) 907 return_VALUE((status == AE_OK)
912 && (out_obj.type == ACPI_TYPE_INTEGER)); 908 && (out_obj.type == ACPI_TYPE_INTEGER));
913} 909}
@@ -954,14 +950,14 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
954 950
955 if (copy_from_user(arg, buffer, count)) { 951 if (copy_from_user(arg, buffer, count)) {
956 kfree(arg); 952 kfree(arg);
957 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 2")); 953 ACPI_ERROR((AE_INFO, "Invalid argument 2"));
958 return_VALUE(-EINVAL); 954 return_VALUE(-EINVAL);
959 } 955 }
960 956
961 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 957 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
962 4) { 958 4) {
963 kfree(arg); 959 kfree(arg);
964 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 3")); 960 ACPI_ERROR((AE_INFO, "Invalid argument 3"));
965 return_VALUE(-EINVAL); 961 return_VALUE(-EINVAL);
966 } 962 }
967 kfree(arg); 963 kfree(arg);
@@ -987,7 +983,7 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
987 983
988 } 984 }
989 } else { 985 } else {
990 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Not supported")); 986 ACPI_WARNING((AE_INFO, "Not supported"));
991 return_VALUE(-EINVAL); 987 return_VALUE(-EINVAL);
992 } 988 }
993 return_VALUE(count); 989 return_VALUE(count);
@@ -1013,9 +1009,6 @@ static int __init hotkey_init(void)
1013 1009
1014 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir); 1010 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir);
1015 if (!hotkey_proc_dir) { 1011 if (!hotkey_proc_dir) {
1016 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1017 "Hotkey: Unable to create %s entry\n",
1018 HOTKEY_PROC));
1019 return (-ENODEV); 1012 return (-ENODEV);
1020 } 1013 }
1021 hotkey_proc_dir->owner = THIS_MODULE; 1014 hotkey_proc_dir->owner = THIS_MODULE;
@@ -1023,9 +1016,6 @@ static int __init hotkey_init(void)
1023 hotkey_config = 1016 hotkey_config =
1024 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir); 1017 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir);
1025 if (!hotkey_config) { 1018 if (!hotkey_config) {
1026 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1027 "Hotkey: Unable to create %s entry\n",
1028 HOTKEY_EV_CONFIG));
1029 goto do_fail1; 1019 goto do_fail1;
1030 } else { 1020 } else {
1031 hotkey_config->proc_fops = &hotkey_config_fops; 1021 hotkey_config->proc_fops = &hotkey_config_fops;
@@ -1038,10 +1028,6 @@ static int __init hotkey_init(void)
1038 hotkey_poll_config = 1028 hotkey_poll_config =
1039 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir); 1029 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir);
1040 if (!hotkey_poll_config) { 1030 if (!hotkey_poll_config) {
1041 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1042 "Hotkey: Unable to create %s entry\n",
1043 HOTKEY_EV_CONFIG));
1044
1045 goto do_fail2; 1031 goto do_fail2;
1046 } else { 1032 } else {
1047 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops; 1033 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops;
@@ -1053,9 +1039,6 @@ static int __init hotkey_init(void)
1053 1039
1054 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir); 1040 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir);
1055 if (!hotkey_action) { 1041 if (!hotkey_action) {
1056 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1057 "Hotkey: Unable to create %s entry\n",
1058 HOTKEY_ACTION));
1059 goto do_fail3; 1042 goto do_fail3;
1060 } else { 1043 } else {
1061 hotkey_action->proc_fops = &hotkey_action_fops; 1044 hotkey_action->proc_fops = &hotkey_action_fops;
@@ -1066,9 +1049,6 @@ static int __init hotkey_init(void)
1066 1049
1067 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir); 1050 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir);
1068 if (!hotkey_info) { 1051 if (!hotkey_info) {
1069 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1070 "Hotkey: Unable to create %s entry\n",
1071 HOTKEY_INFO));
1072 goto do_fail4; 1052 goto do_fail4;
1073 } else { 1053 } else {
1074 hotkey_info->proc_fops = &hotkey_info_fops; 1054 hotkey_info->proc_fops = &hotkey_info_fops;
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 1bb558adee66..740a3c414898 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -137,6 +137,7 @@ void acpi_os_vprintf(const char *fmt, va_list args)
137#endif 137#endif
138} 138}
139 139
140
140extern int acpi_in_resume; 141extern int acpi_in_resume;
141void *acpi_os_allocate(acpi_size size) 142void *acpi_os_allocate(acpi_size size)
142{ 143{
@@ -590,7 +591,7 @@ static void acpi_os_execute_deferred(void *context)
590 591
591 dpc = (struct acpi_os_dpc *)context; 592 dpc = (struct acpi_os_dpc *)context;
592 if (!dpc) { 593 if (!dpc) {
593 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); 594 ACPI_ERROR((AE_INFO, "Invalid (NULL) context"));
594 return_VOID; 595 return_VOID;
595 } 596 }
596 597
@@ -839,13 +840,13 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
839 } 840 }
840 841
841 if (ACPI_FAILURE(status)) { 842 if (ACPI_FAILURE(status)) {
842 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 843 ACPI_EXCEPTION((AE_INFO, status,
843 "Failed to acquire semaphore[%p|%d|%d], %s\n", 844 "Failed to acquire semaphore[%p|%d|%d], %s",
844 handle, units, timeout, 845 handle, units, timeout,
845 acpi_format_exception(status))); 846 acpi_format_exception(status)));
846 } else { 847 } else {
847 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, 848 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
848 "Acquired semaphore[%p|%d|%d]\n", handle, 849 "Acquired semaphore[%p|%d|%d]", handle,
849 units, timeout)); 850 units, timeout));
850 } 851 }
851 852
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 2a718df769b5..6d3e818e327a 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -75,17 +75,17 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id)
75 75
76 result = acpi_bus_get_device(handle, &device); 76 result = acpi_bus_get_device(handle, &device);
77 if (result) { 77 if (result) {
78 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 78 ACPI_ERROR((AE_INFO,
79 "Invalid ACPI Bus context for device %s\n", 79 "Invalid ACPI Bus context for device %s",
80 acpi_device_bid(device))); 80 acpi_device_bid(device)));
81 return_ACPI_STATUS(AE_NOT_EXIST); 81 return_ACPI_STATUS(AE_NOT_EXIST);
82 } 82 }
83 83
84 status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data); 84 status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data);
85 if (ACPI_FAILURE(status) || !data) { 85 if (ACPI_FAILURE(status) || !data) {
86 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 86 ACPI_EXCEPTION((AE_INFO, status,
87 "Invalid ACPI-PCI context for device %s\n", 87 "Invalid ACPI-PCI context for device %s",
88 acpi_device_bid(device))); 88 acpi_device_bid(device)));
89 return_ACPI_STATUS(status); 89 return_ACPI_STATUS(status);
90 } 90 }
91 91
@@ -151,9 +151,9 @@ int acpi_pci_bind(struct acpi_device *device)
151 status = acpi_get_data(device->parent->handle, acpi_pci_data_handler, 151 status = acpi_get_data(device->parent->handle, acpi_pci_data_handler,
152 (void **)&pdata); 152 (void **)&pdata);
153 if (ACPI_FAILURE(status) || !pdata || !pdata->bus) { 153 if (ACPI_FAILURE(status) || !pdata || !pdata->bus) {
154 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 154 ACPI_EXCEPTION((AE_INFO, status,
155 "Invalid ACPI-PCI context for parent device %s\n", 155 "Invalid ACPI-PCI context for parent device %s",
156 acpi_device_bid(device->parent))); 156 acpi_device_bid(device->parent)));
157 result = -ENODEV; 157 result = -ENODEV;
158 goto end; 158 goto end;
159 } 159 }
@@ -206,10 +206,10 @@ int acpi_pci_bind(struct acpi_device *device)
206 goto end; 206 goto end;
207 } 207 }
208 if (!data->dev->bus) { 208 if (!data->dev->bus) {
209 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 209 ACPI_ERROR((AE_INFO,
210 "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n", 210 "Device %02x:%02x:%02x.%02x has invalid 'bus' field",
211 data->id.segment, data->id.bus, 211 data->id.segment, data->id.bus,
212 data->id.device, data->id.function)); 212 data->id.device, data->id.function));
213 result = -ENODEV; 213 result = -ENODEV;
214 goto end; 214 goto end;
215 } 215 }
@@ -237,9 +237,9 @@ int acpi_pci_bind(struct acpi_device *device)
237 */ 237 */
238 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); 238 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data);
239 if (ACPI_FAILURE(status)) { 239 if (ACPI_FAILURE(status)) {
240 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 240 ACPI_EXCEPTION((AE_INFO, status,
241 "Unable to attach ACPI-PCI context to device %s\n", 241 "Unable to attach ACPI-PCI context to device %s",
242 acpi_device_bid(device))); 242 acpi_device_bid(device)));
243 result = -ENODEV; 243 result = -ENODEV;
244 goto end; 244 goto end;
245 } 245 }
@@ -301,18 +301,18 @@ int acpi_pci_unbind(struct acpi_device *device)
301 acpi_get_data(device->handle, acpi_pci_data_handler, 301 acpi_get_data(device->handle, acpi_pci_data_handler,
302 (void **)&data); 302 (void **)&data);
303 if (ACPI_FAILURE(status)) { 303 if (ACPI_FAILURE(status)) {
304 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 304 ACPI_EXCEPTION((AE_INFO, status,
305 "Unable to get data from device %s\n", 305 "Unable to get data from device %s",
306 acpi_device_bid(device))); 306 acpi_device_bid(device)));
307 result = -ENODEV; 307 result = -ENODEV;
308 goto end; 308 goto end;
309 } 309 }
310 310
311 status = acpi_detach_data(device->handle, acpi_pci_data_handler); 311 status = acpi_detach_data(device->handle, acpi_pci_data_handler);
312 if (ACPI_FAILURE(status)) { 312 if (ACPI_FAILURE(status)) {
313 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 313 ACPI_EXCEPTION((AE_INFO, status,
314 "Unable to detach data from device %s\n", 314 "Unable to detach data from device %s",
315 acpi_device_bid(device))); 315 acpi_device_bid(device)));
316 result = -ENODEV; 316 result = -ENODEV;
317 goto end; 317 goto end;
318 } 318 }
@@ -369,9 +369,9 @@ acpi_pci_bind_root(struct acpi_device *device,
369 369
370 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); 370 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data);
371 if (ACPI_FAILURE(status)) { 371 if (ACPI_FAILURE(status)) {
372 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 372 ACPI_EXCEPTION((AE_INFO, status,
373 "Unable to attach ACPI-PCI context to device %s\n", 373 "Unable to attach ACPI-PCI context to device %s",
374 pathname)); 374 pathname));
375 result = -ENODEV; 375 result = -ENODEV;
376 goto end; 376 goto end;
377 } 377 }
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 65aee79b3971..4cabc51246de 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -197,8 +197,8 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
197 kfree(pathname); 197 kfree(pathname);
198 status = acpi_get_irq_routing_table(handle, &buffer); 198 status = acpi_get_irq_routing_table(handle, &buffer);
199 if (status != AE_BUFFER_OVERFLOW) { 199 if (status != AE_BUFFER_OVERFLOW) {
200 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", 200 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
201 acpi_format_exception(status))); 201 acpi_format_exception(status)));
202 return_VALUE(-ENODEV); 202 return_VALUE(-ENODEV);
203 } 203 }
204 204
@@ -211,8 +211,8 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
211 211
212 status = acpi_get_irq_routing_table(handle, &buffer); 212 status = acpi_get_irq_routing_table(handle, &buffer);
213 if (ACPI_FAILURE(status)) { 213 if (ACPI_FAILURE(status)) {
214 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", 214 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
215 acpi_format_exception(status))); 215 acpi_format_exception(status)));
216 kfree(buffer.pointer); 216 kfree(buffer.pointer);
217 return_VALUE(-ENODEV); 217 return_VALUE(-ENODEV);
218 } 218 }
@@ -269,8 +269,8 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
269 entry->link.index, triggering, 269 entry->link.index, triggering,
270 polarity, link); 270 polarity, link);
271 if (irq < 0) { 271 if (irq < 0) {
272 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 272 ACPI_WARNING((AE_INFO,
273 "Invalid IRQ link routing entry\n")); 273 "Invalid IRQ link routing entry"));
274 return_VALUE(-1); 274 return_VALUE(-1);
275 } 275 }
276 } else { 276 } else {
@@ -379,9 +379,8 @@ acpi_pci_irq_derive(struct pci_dev *dev,
379 } 379 }
380 380
381 if (irq < 0) { 381 if (irq < 0) {
382 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 382 ACPI_WARNING((AE_INFO, "Unable to derive IRQ for device %s",
383 "Unable to derive IRQ for device %s\n", 383 pci_name(dev)));
384 pci_name(dev)));
385 return_VALUE(-1); 384 return_VALUE(-1);
386 } 385 }
387 386
@@ -421,8 +420,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
421 pin--; 420 pin--;
422 421
423 if (!dev->bus) { 422 if (!dev->bus) {
424 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 423 ACPI_ERROR((AE_INFO, "Invalid (NULL) 'bus' field"));
425 "Invalid (NULL) 'bus' field\n"));
426 return_VALUE(-ENODEV); 424 return_VALUE(-ENODEV);
427 } 425 }
428 426
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 228bdb626502..415b2628fe85 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -116,17 +116,15 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
116 { 116 {
117 struct acpi_resource_irq *p = &resource->data.irq; 117 struct acpi_resource_irq *p = &resource->data.irq;
118 if (!p || !p->interrupt_count) { 118 if (!p || !p->interrupt_count) {
119 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 119 ACPI_WARNING((AE_INFO, "Blank IRQ resource"));
120 "Blank IRQ resource\n"));
121 return_ACPI_STATUS(AE_OK); 120 return_ACPI_STATUS(AE_OK);
122 } 121 }
123 for (i = 0; 122 for (i = 0;
124 (i < p->interrupt_count 123 (i < p->interrupt_count
125 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { 124 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
126 if (!p->interrupts[i]) { 125 if (!p->interrupts[i]) {
127 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 126 ACPI_WARNING((AE_INFO, "Invalid IRQ %d",
128 "Invalid IRQ %d\n", 127 p->interrupts[i]));
129 p->interrupts[i]));
130 continue; 128 continue;
131 } 129 }
132 link->irq.possible[i] = p->interrupts[i]; 130 link->irq.possible[i] = p->interrupts[i];
@@ -142,17 +140,16 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
142 struct acpi_resource_extended_irq *p = 140 struct acpi_resource_extended_irq *p =
143 &resource->data.extended_irq; 141 &resource->data.extended_irq;
144 if (!p || !p->interrupt_count) { 142 if (!p || !p->interrupt_count) {
145 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 143 ACPI_WARNING((AE_INFO,
146 "Blank EXT IRQ resource\n")); 144 "Blank EXT IRQ resource"));
147 return_ACPI_STATUS(AE_OK); 145 return_ACPI_STATUS(AE_OK);
148 } 146 }
149 for (i = 0; 147 for (i = 0;
150 (i < p->interrupt_count 148 (i < p->interrupt_count
151 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { 149 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
152 if (!p->interrupts[i]) { 150 if (!p->interrupts[i]) {
153 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 151 ACPI_WARNING((AE_INFO, "Invalid IRQ %d",
154 "Invalid IRQ %d\n", 152 p->interrupts[i]));
155 p->interrupts[i]));
156 continue; 153 continue;
157 } 154 }
158 link->irq.possible[i] = p->interrupts[i]; 155 link->irq.possible[i] = p->interrupts[i];
@@ -164,8 +161,7 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
164 break; 161 break;
165 } 162 }
166 default: 163 default:
167 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 164 ACPI_ERROR((AE_INFO, "Resource is not an IRQ entry\n"));
168 "Resource is not an IRQ entry\n"));
169 return_ACPI_STATUS(AE_OK); 165 return_ACPI_STATUS(AE_OK);
170 } 166 }
171 167
@@ -184,7 +180,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
184 status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, 180 status = acpi_walk_resources(link->handle, METHOD_NAME__PRS,
185 acpi_pci_link_check_possible, link); 181 acpi_pci_link_check_possible, link);
186 if (ACPI_FAILURE(status)) { 182 if (ACPI_FAILURE(status)) {
187 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRS\n")); 183 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
188 return_VALUE(-ENODEV); 184 return_VALUE(-ENODEV);
189 } 185 }
190 186
@@ -227,8 +223,8 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
227 * extended IRQ descriptors must 223 * extended IRQ descriptors must
228 * return at least 1 IRQ 224 * return at least 1 IRQ
229 */ 225 */
230 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 226 ACPI_WARNING((AE_INFO,
231 "Blank EXT IRQ resource\n")); 227 "Blank EXT IRQ resource"));
232 return_ACPI_STATUS(AE_OK); 228 return_ACPI_STATUS(AE_OK);
233 } 229 }
234 *irq = p->interrupts[0]; 230 *irq = p->interrupts[0];
@@ -236,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
236 } 232 }
237 break; 233 break;
238 default: 234 default:
239 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Resource %d isn't an IRQ\n", resource->type)); 235 ACPI_ERROR((AE_INFO, "Resource %d isn't an IRQ", resource->type));
240 case ACPI_RESOURCE_TYPE_END_TAG: 236 case ACPI_RESOURCE_TYPE_END_TAG:
241 return_ACPI_STATUS(AE_OK); 237 return_ACPI_STATUS(AE_OK);
242 } 238 }
@@ -268,8 +264,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
268 /* Query _STA, set link->device->status */ 264 /* Query _STA, set link->device->status */
269 result = acpi_bus_get_status(link->device); 265 result = acpi_bus_get_status(link->device);
270 if (result) { 266 if (result) {
271 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 267 ACPI_ERROR((AE_INFO, "Unable to read status"));
272 "Unable to read status\n"));
273 goto end; 268 goto end;
274 } 269 }
275 270
@@ -286,13 +281,13 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
286 status = acpi_walk_resources(link->handle, METHOD_NAME__CRS, 281 status = acpi_walk_resources(link->handle, METHOD_NAME__CRS,
287 acpi_pci_link_check_current, &irq); 282 acpi_pci_link_check_current, &irq);
288 if (ACPI_FAILURE(status)) { 283 if (ACPI_FAILURE(status)) {
289 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _CRS\n")); 284 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS"));
290 result = -ENODEV; 285 result = -ENODEV;
291 goto end; 286 goto end;
292 } 287 }
293 288
294 if (acpi_strict && !irq) { 289 if (acpi_strict && !irq) {
295 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_CRS returned 0\n")); 290 ACPI_ERROR((AE_INFO, "_CRS returned 0"));
296 result = -ENODEV; 291 result = -ENODEV;
297 } 292 }
298 293
@@ -362,7 +357,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
362 /* ignore resource_source, it's optional */ 357 /* ignore resource_source, it's optional */
363 break; 358 break;
364 default: 359 default:
365 printk("ACPI BUG: resource_type %d\n", link->irq.resource_type); 360 ACPI_ERROR((AE_INFO, "Invalid Resource_type %d\n", link->irq.resource_type));
366 result = -EINVAL; 361 result = -EINVAL;
367 goto end; 362 goto end;
368 363
@@ -374,7 +369,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
374 369
375 /* check for total failure */ 370 /* check for total failure */
376 if (ACPI_FAILURE(status)) { 371 if (ACPI_FAILURE(status)) {
377 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n")); 372 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SRS"));
378 result = -ENODEV; 373 result = -ENODEV;
379 goto end; 374 goto end;
380 } 375 }
@@ -382,14 +377,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
382 /* Query _STA, set device->status */ 377 /* Query _STA, set device->status */
383 result = acpi_bus_get_status(link->device); 378 result = acpi_bus_get_status(link->device);
384 if (result) { 379 if (result) {
385 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to read status\n")); 380 ACPI_ERROR((AE_INFO, "Unable to read status"));
386 goto end; 381 goto end;
387 } 382 }
388 if (!link->device->status.enabled) { 383 if (!link->device->status.enabled) {
389 printk(KERN_WARNING PREFIX 384 ACPI_WARNING((AE_INFO,
390 "%s [%s] disabled and referenced, BIOS bug.\n", 385 "%s [%s] disabled and referenced, BIOS bug",
391 acpi_device_name(link->device), 386 acpi_device_name(link->device),
392 acpi_device_bid(link->device)); 387 acpi_device_bid(link->device)));
393 } 388 }
394 389
395 /* Query _CRS, set link->irq.active */ 390 /* Query _CRS, set link->irq.active */
@@ -407,10 +402,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
407 * policy: when _CRS doesn't return what we just _SRS 402 * policy: when _CRS doesn't return what we just _SRS
408 * assume _SRS worked and override _CRS value. 403 * assume _SRS worked and override _CRS value.
409 */ 404 */
410 printk(KERN_WARNING PREFIX 405 ACPI_WARNING((AE_INFO,
411 "%s [%s] BIOS reported IRQ %d, using IRQ %d\n", 406 "%s [%s] BIOS reported IRQ %d, using IRQ %d",
412 acpi_device_name(link->device), 407 acpi_device_name(link->device),
413 acpi_device_bid(link->device), link->irq.active, irq); 408 acpi_device_bid(link->device), link->irq.active, irq));
414 link->irq.active = irq; 409 link->irq.active = irq;
415 } 410 }
416 411
@@ -501,8 +496,7 @@ int __init acpi_irq_penalty_init(void)
501 496
502 link = list_entry(node, struct acpi_pci_link, node); 497 link = list_entry(node, struct acpi_pci_link, node);
503 if (!link) { 498 if (!link) {
504 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 499 ACPI_ERROR((AE_INFO, "Invalid link context"));
505 "Invalid link context\n"));
506 continue; 500 continue;
507 } 501 }
508 502
@@ -561,8 +555,8 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
561 */ 555 */
562 if (i == link->irq.possible_count) { 556 if (i == link->irq.possible_count) {
563 if (acpi_strict) 557 if (acpi_strict)
564 printk(KERN_WARNING PREFIX "_CRS %d not found" 558 ACPI_WARNING((AE_INFO, "_CRS %d not found"
565 " in _PRS\n", link->irq.active); 559 " in _PRS", link->irq.active));
566 link->irq.active = 0; 560 link->irq.active = 0;
567 } 561 }
568 562
@@ -589,11 +583,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
589 583
590 /* Attempt to enable the link device at this IRQ. */ 584 /* Attempt to enable the link device at this IRQ. */
591 if (acpi_pci_link_set(link, irq)) { 585 if (acpi_pci_link_set(link, irq)) {
592 printk(PREFIX 586 ACPI_ERROR((AE_INFO, "Unable to set IRQ for %s [%s]. "
593 "Unable to set IRQ for %s [%s] (likely buggy ACPI BIOS).\n" 587 "Try pci=noacpi or acpi=off",
594 "Try pci=noacpi or acpi=off\n", 588 acpi_device_name(link->device),
595 acpi_device_name(link->device), 589 acpi_device_bid(link->device)));
596 acpi_device_bid(link->device));
597 return_VALUE(-ENODEV); 590 return_VALUE(-ENODEV);
598 } else { 591 } else {
599 acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING; 592 acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
@@ -626,19 +619,19 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
626 619
627 result = acpi_bus_get_device(handle, &device); 620 result = acpi_bus_get_device(handle, &device);
628 if (result) { 621 if (result) {
629 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); 622 ACPI_ERROR((AE_INFO, "Invalid link device"));
630 return_VALUE(-1); 623 return_VALUE(-1);
631 } 624 }
632 625
633 link = (struct acpi_pci_link *)acpi_driver_data(device); 626 link = (struct acpi_pci_link *)acpi_driver_data(device);
634 if (!link) { 627 if (!link) {
635 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 628 ACPI_ERROR((AE_INFO, "Invalid link context"));
636 return_VALUE(-1); 629 return_VALUE(-1);
637 } 630 }
638 631
639 /* TBD: Support multiple index (IRQ) entries per Link Device */ 632 /* TBD: Support multiple index (IRQ) entries per Link Device */
640 if (index) { 633 if (index) {
641 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid index %d\n", index)); 634 ACPI_ERROR((AE_INFO, "Invalid index %d", index));
642 return_VALUE(-1); 635 return_VALUE(-1);
643 } 636 }
644 637
@@ -650,7 +643,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
650 643
651 if (!link->irq.active) { 644 if (!link->irq.active) {
652 mutex_unlock(&acpi_link_lock); 645 mutex_unlock(&acpi_link_lock);
653 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); 646 ACPI_ERROR((AE_INFO, "Link active IRQ is 0!"));
654 return_VALUE(-1); 647 return_VALUE(-1);
655 } 648 }
656 link->refcnt++; 649 link->refcnt++;
@@ -682,20 +675,20 @@ int acpi_pci_link_free_irq(acpi_handle handle)
682 675
683 result = acpi_bus_get_device(handle, &device); 676 result = acpi_bus_get_device(handle, &device);
684 if (result) { 677 if (result) {
685 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); 678 ACPI_ERROR((AE_INFO, "Invalid link device"));
686 return_VALUE(-1); 679 return_VALUE(-1);
687 } 680 }
688 681
689 link = (struct acpi_pci_link *)acpi_driver_data(device); 682 link = (struct acpi_pci_link *)acpi_driver_data(device);
690 if (!link) { 683 if (!link) {
691 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 684 ACPI_ERROR((AE_INFO, "Invalid link context"));
692 return_VALUE(-1); 685 return_VALUE(-1);
693 } 686 }
694 687
695 mutex_lock(&acpi_link_lock); 688 mutex_lock(&acpi_link_lock);
696 if (!link->irq.initialized) { 689 if (!link->irq.initialized) {
697 mutex_unlock(&acpi_link_lock); 690 mutex_unlock(&acpi_link_lock);
698 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link isn't initialized\n")); 691 ACPI_ERROR((AE_INFO, "Link isn't initialized"));
699 return_VALUE(-1); 692 return_VALUE(-1);
700 } 693 }
701#ifdef FUTURE_USE 694#ifdef FUTURE_USE
@@ -820,8 +813,7 @@ static int irqrouter_resume(struct sys_device *dev)
820 list_for_each(node, &acpi_link.entries) { 813 list_for_each(node, &acpi_link.entries) {
821 link = list_entry(node, struct acpi_pci_link, node); 814 link = list_entry(node, struct acpi_pci_link, node);
822 if (!link) { 815 if (!link) {
823 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 816 ACPI_ERROR((AE_INFO, "Invalid link context"));
824 "Invalid link context\n"));
825 continue; 817 continue;
826 } 818 }
827 acpi_pci_link_resume(link); 819 acpi_pci_link_resume(link);
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 4c313eab6313..0f661dd42d41 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -198,7 +198,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
198 root->id.segment = 0; 198 root->id.segment = 0;
199 break; 199 break;
200 default: 200 default:
201 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SEG\n")); 201 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SEG"));
202 result = -ENODEV; 202 result = -ENODEV;
203 goto end; 203 goto end;
204 } 204 }
@@ -219,7 +219,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
219 root->id.bus = 0; 219 root->id.bus = 0;
220 break; 220 break;
221 default: 221 default:
222 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BBN\n")); 222 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BBN"));
223 result = -ENODEV; 223 result = -ENODEV;
224 goto end; 224 goto end;
225 } 225 }
@@ -231,8 +231,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
231 int bus = 0; 231 int bus = 0;
232 acpi_status status; 232 acpi_status status;
233 233
234 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 234 ACPI_ERROR((AE_INFO,
235 "Wrong _BBN value, please reboot and using option 'pci=noacpi'\n")); 235 "Wrong _BBN value, reboot"
236 " and use option 'pci=noacpi'"));
236 237
237 status = try_get_root_bridge_busnr(root->handle, &bus); 238 status = try_get_root_bridge_busnr(root->handle, &bus);
238 if (ACPI_FAILURE(status)) 239 if (ACPI_FAILURE(status))
@@ -273,9 +274,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
273 */ 274 */
274 root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus); 275 root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus);
275 if (!root->bus) { 276 if (!root->bus) {
276 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 277 ACPI_ERROR((AE_INFO,
277 "Bus %04x:%02x not present in PCI namespace\n", 278 "Bus %04x:%02x not present in PCI namespace",
278 root->id.segment, root->id.bus)); 279 root->id.segment, root->id.bus));
279 result = -ENODEV; 280 result = -ENODEV;
280 goto end; 281 goto end;
281 } 282 }
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 62a5595ed8bc..5712803ddc78 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -105,8 +105,7 @@ acpi_power_get_context(acpi_handle handle,
105 105
106 result = acpi_bus_get_device(handle, &device); 106 result = acpi_bus_get_device(handle, &device);
107 if (result) { 107 if (result) {
108 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error getting context [%p]\n", 108 ACPI_WARNING((AE_INFO, "Getting context [%p]", handle));
109 handle));
110 return_VALUE(result); 109 return_VALUE(result);
111 } 110 }
112 111
@@ -292,8 +291,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev)
292 for (i = 0; i < dev->wakeup.resources.count; i++) { 291 for (i = 0; i < dev->wakeup.resources.count; i++) {
293 ret = acpi_power_on(dev->wakeup.resources.handles[i]); 292 ret = acpi_power_on(dev->wakeup.resources.handles[i]);
294 if (ret) { 293 if (ret) {
295 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 294 ACPI_ERROR((AE_INFO, "Transition power state"));
296 "Error transition power state\n"));
297 dev->wakeup.flags.valid = 0; 295 dev->wakeup.flags.valid = 0;
298 return_VALUE(-1); 296 return_VALUE(-1);
299 } 297 }
@@ -302,7 +300,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev)
302 /* Execute PSW */ 300 /* Execute PSW */
303 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); 301 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
304 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 302 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
305 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); 303 ACPI_ERROR((AE_INFO, "Evaluate _PSW"));
306 dev->wakeup.flags.valid = 0; 304 dev->wakeup.flags.valid = 0;
307 ret = -1; 305 ret = -1;
308 } 306 }
@@ -332,7 +330,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
332 /* Execute PSW */ 330 /* Execute PSW */
333 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); 331 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
334 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 332 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
335 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); 333 ACPI_ERROR((AE_INFO, "Evaluate _PSW"));
336 dev->wakeup.flags.valid = 0; 334 dev->wakeup.flags.valid = 0;
337 return_VALUE(-1); 335 return_VALUE(-1);
338 } 336 }
@@ -341,8 +339,7 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
341 for (i = 0; i < dev->wakeup.resources.count; i++) { 339 for (i = 0; i < dev->wakeup.resources.count; i++) {
342 ret = acpi_power_off_device(dev->wakeup.resources.handles[i]); 340 ret = acpi_power_off_device(dev->wakeup.resources.handles[i]);
343 if (ret) { 341 if (ret) {
344 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 342 ACPI_ERROR((AE_INFO, "Transition power state"));
345 "Error transition power state\n"));
346 dev->wakeup.flags.valid = 0; 343 dev->wakeup.flags.valid = 0;
347 return_VALUE(-1); 344 return_VALUE(-1);
348 } 345 }
@@ -444,9 +441,8 @@ int acpi_power_transition(struct acpi_device *device, int state)
444 device->power.state = state; 441 device->power.state = state;
445 end: 442 end:
446 if (result) 443 if (result)
447 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 444 ACPI_WARNING((AE_INFO, "Transitioning device [%s] to D%d",
448 "Error transitioning device [%s] to D%d\n", 445 device->pnp.bus_id, state));
449 device->pnp.bus_id, state));
450 446
451 return_VALUE(result); 447 return_VALUE(result);
452} 448}
@@ -516,9 +512,7 @@ static int acpi_power_add_fs(struct acpi_device *device)
516 entry = create_proc_entry(ACPI_POWER_FILE_STATUS, 512 entry = create_proc_entry(ACPI_POWER_FILE_STATUS,
517 S_IRUGO, acpi_device_dir(device)); 513 S_IRUGO, acpi_device_dir(device));
518 if (!entry) 514 if (!entry)
519 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 515 return_VALUE(-EIO);
520 "Unable to create '%s' fs entry\n",
521 ACPI_POWER_FILE_STATUS));
522 else { 516 else {
523 entry->proc_fops = &acpi_power_fops; 517 entry->proc_fops = &acpi_power_fops;
524 entry->data = acpi_driver_data(device); 518 entry->data = acpi_driver_data(device);
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index decaebb4cbe9..2bbdf8a7a304 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -328,9 +328,7 @@ static int acpi_processor_add_fs(struct acpi_device *device)
328 entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, 328 entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO,
329 S_IRUGO, acpi_device_dir(device)); 329 S_IRUGO, acpi_device_dir(device));
330 if (!entry) 330 if (!entry)
331 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 331 return_VALUE(-EIO);
332 "Unable to create '%s' fs entry\n",
333 ACPI_PROCESSOR_FILE_INFO));
334 else { 332 else {
335 entry->proc_fops = &acpi_processor_info_fops; 333 entry->proc_fops = &acpi_processor_info_fops;
336 entry->data = acpi_driver_data(device); 334 entry->data = acpi_driver_data(device);
@@ -342,9 +340,7 @@ static int acpi_processor_add_fs(struct acpi_device *device)
342 S_IFREG | S_IRUGO | S_IWUSR, 340 S_IFREG | S_IRUGO | S_IWUSR,
343 acpi_device_dir(device)); 341 acpi_device_dir(device));
344 if (!entry) 342 if (!entry)
345 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 343 return_VALUE(-EIO);
346 "Unable to create '%s' fs entry\n",
347 ACPI_PROCESSOR_FILE_THROTTLING));
348 else { 344 else {
349 entry->proc_fops = &acpi_processor_throttling_fops; 345 entry->proc_fops = &acpi_processor_throttling_fops;
350 entry->data = acpi_driver_data(device); 346 entry->data = acpi_driver_data(device);
@@ -356,9 +352,7 @@ static int acpi_processor_add_fs(struct acpi_device *device)
356 S_IFREG | S_IRUGO | S_IWUSR, 352 S_IFREG | S_IRUGO | S_IWUSR,
357 acpi_device_dir(device)); 353 acpi_device_dir(device));
358 if (!entry) 354 if (!entry)
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 355 return_VALUE( -EIO);
360 "Unable to create '%s' fs entry\n",
361 ACPI_PROCESSOR_FILE_LIMIT));
362 else { 356 else {
363 entry->proc_fops = &acpi_processor_limit_fops; 357 entry->proc_fops = &acpi_processor_limit_fops;
364 entry->data = acpi_driver_data(device); 358 entry->data = acpi_driver_data(device);
@@ -459,8 +453,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
459 */ 453 */
460 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); 454 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
461 if (ACPI_FAILURE(status)) { 455 if (ACPI_FAILURE(status)) {
462 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 456 ACPI_ERROR((AE_INFO, "Evaluating processor object"));
463 "Error evaluating processor object\n"));
464 return_VALUE(-ENODEV); 457 return_VALUE(-ENODEV);
465 } 458 }
466 459
@@ -490,9 +483,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
490 if (cpu_index == -1) { 483 if (cpu_index == -1) {
491 if (ACPI_FAILURE 484 if (ACPI_FAILURE
492 (acpi_processor_hotadd_init(pr->handle, &pr->id))) { 485 (acpi_processor_hotadd_init(pr->handle, &pr->id))) {
493 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 486 ACPI_ERROR((AE_INFO,
494 "Error getting cpuindex for acpiid 0x%x\n", 487 "Getting cpuindex for acpiid 0x%x",
495 pr->acpi_id)); 488 pr->acpi_id));
496 return_VALUE(-ENODEV); 489 return_VALUE(-ENODEV);
497 } 490 }
498 } 491 }
@@ -503,8 +496,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
503 if (!object.processor.pblk_address) 496 if (!object.processor.pblk_address)
504 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); 497 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
505 else if (object.processor.pblk_length != 6) 498 else if (object.processor.pblk_length != 6)
506 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n", 499 ACPI_ERROR((AE_INFO, "Invalid PBLK length [%d]",
507 object.processor.pblk_length)); 500 object.processor.pblk_length));
508 else { 501 else {
509 pr->throttling.address = object.processor.pblk_address; 502 pr->throttling.address = object.processor.pblk_address;
510 pr->throttling.duty_offset = acpi_fadt.duty_offset; 503 pr->throttling.duty_offset = acpi_fadt.duty_offset;
@@ -572,10 +565,6 @@ static int acpi_processor_start(struct acpi_device *device)
572 565
573 status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 566 status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
574 acpi_processor_notify, pr); 567 acpi_processor_notify, pr);
575 if (ACPI_FAILURE(status)) {
576 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
577 "Error installing device notify handler\n"));
578 }
579 568
580 /* _PDC call should be done before doing anything else (if reqd.). */ 569 /* _PDC call should be done before doing anything else (if reqd.). */
581 arch_acpi_processor_init_pdc(pr); 570 arch_acpi_processor_init_pdc(pr);
@@ -675,10 +664,6 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
675 664
676 status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 665 status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
677 acpi_processor_notify); 666 acpi_processor_notify);
678 if (ACPI_FAILURE(status)) {
679 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
680 "Error removing notify handler\n"));
681 }
682 667
683 acpi_processor_remove_fs(device); 668 acpi_processor_remove_fs(device);
684 669
@@ -705,8 +690,7 @@ static int is_processor_present(acpi_handle handle)
705 690
706 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 691 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
707 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { 692 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) {
708 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 693 ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
709 "Processor Device is not present\n"));
710 return_VALUE(0); 694 return_VALUE(0);
711 } 695 }
712 return_VALUE(1); 696 return_VALUE(1);
@@ -767,15 +751,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
767 if (acpi_bus_get_device(handle, &device)) { 751 if (acpi_bus_get_device(handle, &device)) {
768 result = acpi_processor_device_add(handle, &device); 752 result = acpi_processor_device_add(handle, &device);
769 if (result) 753 if (result)
770 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 754 ACPI_ERROR((AE_INFO,
771 "Unable to add the device\n")); 755 "Unable to add the device"));
772 break; 756 break;
773 } 757 }
774 758
775 pr = acpi_driver_data(device); 759 pr = acpi_driver_data(device);
776 if (!pr) { 760 if (!pr) {
777 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 761 ACPI_ERROR((AE_INFO, "Driver data is NULL"));
778 "Driver data is NULL\n"));
779 break; 762 break;
780 } 763 }
781 764
@@ -788,9 +771,8 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
788 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { 771 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
789 kobject_uevent(&device->kobj, KOBJ_ONLINE); 772 kobject_uevent(&device->kobj, KOBJ_ONLINE);
790 } else { 773 } else {
791 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 774 ACPI_ERROR((AE_INFO, "Device [%s] failed to start",
792 "Device [%s] failed to start\n", 775 acpi_device_bid(device)));
793 acpi_device_bid(device)));
794 } 776 }
795 break; 777 break;
796 case ACPI_NOTIFY_EJECT_REQUEST: 778 case ACPI_NOTIFY_EJECT_REQUEST:
@@ -798,14 +780,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
798 "received ACPI_NOTIFY_EJECT_REQUEST\n")); 780 "received ACPI_NOTIFY_EJECT_REQUEST\n"));
799 781
800 if (acpi_bus_get_device(handle, &device)) { 782 if (acpi_bus_get_device(handle, &device)) {
801 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 783 ACPI_ERROR((AE_INFO,
802 "Device don't exist, dropping EJECT\n")); 784 "Device don't exist, dropping EJECT"));
803 break; 785 break;
804 } 786 }
805 pr = acpi_driver_data(device); 787 pr = acpi_driver_data(device);
806 if (!pr) { 788 if (!pr) {
807 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 789 ACPI_ERROR((AE_INFO,
808 "Driver data is NULL, dropping EJECT\n")); 790 "Driver data is NULL, dropping EJECT"));
809 return_VOID; 791 return_VOID;
810 } 792 }
811 793
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 8a74bf3efd8e..52ada5322447 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -674,8 +674,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
674 674
675 /* There must be at least 2 elements */ 675 /* There must be at least 2 elements */
676 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { 676 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
677 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 677 ACPI_ERROR((AE_INFO, "not enough elements in _CST"));
678 "not enough elements in _CST\n"));
679 status = -EFAULT; 678 status = -EFAULT;
680 goto end; 679 goto end;
681 } 680 }
@@ -684,8 +683,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
684 683
685 /* Validate number of power states. */ 684 /* Validate number of power states. */
686 if (count < 1 || count != cst->package.count - 1) { 685 if (count < 1 || count != cst->package.count - 1) {
687 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 686 ACPI_ERROR((AE_INFO, "count given by _CST is not valid"));
688 "count given by _CST is not valid\n"));
689 status = -EFAULT; 687 status = -EFAULT;
690 goto end; 688 goto end;
691 } 689 }
@@ -1112,8 +1110,8 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1112 status = 1110 status =
1113 acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8); 1111 acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8);
1114 if (ACPI_FAILURE(status)) { 1112 if (ACPI_FAILURE(status)) {
1115 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1113 ACPI_EXCEPTION((AE_INFO, status,
1116 "Notifying BIOS of _CST ability failed\n")); 1114 "Notifying BIOS of _CST ability failed"));
1117 } 1115 }
1118 } 1116 }
1119 1117
@@ -1142,9 +1140,7 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1142 entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER, 1140 entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER,
1143 S_IRUGO, acpi_device_dir(device)); 1141 S_IRUGO, acpi_device_dir(device));
1144 if (!entry) 1142 if (!entry)
1145 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1143 return -EIO;
1146 "Unable to create '%s' fs entry\n",
1147 ACPI_PROCESSOR_FILE_POWER));
1148 else { 1144 else {
1149 entry->proc_fops = &acpi_processor_power_fops; 1145 entry->proc_fops = &acpi_processor_power_fops;
1150 entry->data = acpi_driver_data(device); 1146 entry->data = acpi_driver_data(device);
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 41aaaba74b19..a79b6ef8122a 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -123,7 +123,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
123 acpi_processor_ppc_status |= PPC_IN_USE; 123 acpi_processor_ppc_status |= PPC_IN_USE;
124 124
125 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 125 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
126 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n")); 126 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC"));
127 return_VALUE(-ENODEV); 127 return_VALUE(-ENODEV);
128 } 128 }
129 129
@@ -172,14 +172,14 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
172 172
173 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); 173 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
174 if (ACPI_FAILURE(status)) { 174 if (ACPI_FAILURE(status)) {
175 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n")); 175 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT"));
176 return_VALUE(-ENODEV); 176 return_VALUE(-ENODEV);
177 } 177 }
178 178
179 pct = (union acpi_object *)buffer.pointer; 179 pct = (union acpi_object *)buffer.pointer;
180 if (!pct || (pct->type != ACPI_TYPE_PACKAGE) 180 if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
181 || (pct->package.count != 2)) { 181 || (pct->package.count != 2)) {
182 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n")); 182 ACPI_ERROR((AE_INFO, "Invalid _PCT data"));
183 result = -EFAULT; 183 result = -EFAULT;
184 goto end; 184 goto end;
185 } 185 }
@@ -193,8 +193,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
193 if ((obj.type != ACPI_TYPE_BUFFER) 193 if ((obj.type != ACPI_TYPE_BUFFER)
194 || (obj.buffer.length < sizeof(struct acpi_pct_register)) 194 || (obj.buffer.length < sizeof(struct acpi_pct_register))
195 || (obj.buffer.pointer == NULL)) { 195 || (obj.buffer.pointer == NULL)) {
196 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 196 ACPI_ERROR((AE_INFO, "Invalid _PCT data (control_register)"));
197 "Invalid _PCT data (control_register)\n"));
198 result = -EFAULT; 197 result = -EFAULT;
199 goto end; 198 goto end;
200 } 199 }
@@ -210,8 +209,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
210 if ((obj.type != ACPI_TYPE_BUFFER) 209 if ((obj.type != ACPI_TYPE_BUFFER)
211 || (obj.buffer.length < sizeof(struct acpi_pct_register)) 210 || (obj.buffer.length < sizeof(struct acpi_pct_register))
212 || (obj.buffer.pointer == NULL)) { 211 || (obj.buffer.pointer == NULL)) {
213 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 212 ACPI_ERROR((AE_INFO, "Invalid _PCT data (status_register)"));
214 "Invalid _PCT data (status_register)\n"));
215 result = -EFAULT; 213 result = -EFAULT;
216 goto end; 214 goto end;
217 } 215 }
@@ -239,13 +237,13 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
239 237
240 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); 238 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
241 if (ACPI_FAILURE(status)) { 239 if (ACPI_FAILURE(status)) {
242 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n")); 240 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PSS"));
243 return_VALUE(-ENODEV); 241 return_VALUE(-ENODEV);
244 } 242 }
245 243
246 pss = (union acpi_object *)buffer.pointer; 244 pss = (union acpi_object *)buffer.pointer;
247 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { 245 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
248 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n")); 246 ACPI_ERROR((AE_INFO, "Invalid _PSS data"));
249 result = -EFAULT; 247 result = -EFAULT;
250 goto end; 248 goto end;
251 } 249 }
@@ -274,8 +272,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
274 status = acpi_extract_package(&(pss->package.elements[i]), 272 status = acpi_extract_package(&(pss->package.elements[i]),
275 &format, &state); 273 &format, &state);
276 if (ACPI_FAILURE(status)) { 274 if (ACPI_FAILURE(status)) {
277 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 275 ACPI_EXCEPTION((AE_INFO, status, "Invalid _PSS data"));
278 "Invalid _PSS data\n"));
279 result = -EFAULT; 276 result = -EFAULT;
280 kfree(pr->performance->states); 277 kfree(pr->performance->states);
281 goto end; 278 goto end;
@@ -291,8 +288,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
291 (u32) px->control, (u32) px->status)); 288 (u32) px->control, (u32) px->status));
292 289
293 if (!px->core_frequency) { 290 if (!px->core_frequency) {
294 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 291 ACPI_ERROR((AE_INFO,
295 "Invalid _PSS data: freq is zero\n")); 292 "Invalid _PSS data: freq is zero"));
296 result = -EFAULT; 293 result = -EFAULT;
297 kfree(pr->performance->states); 294 kfree(pr->performance->states);
298 goto end; 295 goto end;
@@ -387,10 +384,10 @@ int acpi_processor_notify_smm(struct module *calling_module)
387 status = acpi_os_write_port(acpi_fadt.smi_cmd, 384 status = acpi_os_write_port(acpi_fadt.smi_cmd,
388 (u32) acpi_fadt.pstate_cnt, 8); 385 (u32) acpi_fadt.pstate_cnt, 8);
389 if (ACPI_FAILURE(status)) { 386 if (ACPI_FAILURE(status)) {
390 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 387 ACPI_EXCEPTION((AE_INFO, status,
391 "Failed to write pstate_cnt [0x%x] to " 388 "Failed to write pstate_cnt [0x%x] to "
392 "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, 389 "smi_cmd [0x%x]", acpi_fadt.pstate_cnt,
393 acpi_fadt.smi_cmd)); 390 acpi_fadt.smi_cmd));
394 module_put(calling_module); 391 module_put(calling_module);
395 return_VALUE(status); 392 return_VALUE(status);
396 } 393 }
@@ -514,11 +511,7 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr)
514 entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, 511 entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
515 S_IFREG | S_IRUGO | S_IWUSR, 512 S_IFREG | S_IRUGO | S_IWUSR,
516 acpi_device_dir(device)); 513 acpi_device_dir(device));
517 if (!entry) 514 if (entry){
518 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
519 "Unable to create '%s' fs entry\n",
520 ACPI_PROCESSOR_FILE_PERFORMANCE));
521 else {
522 acpi_processor_perf_fops.write = acpi_processor_write_performance; 515 acpi_processor_perf_fops.write = acpi_processor_write_performance;
523 entry->proc_fops = &acpi_processor_perf_fops; 516 entry->proc_fops = &acpi_processor_perf_fops;
524 entry->data = acpi_driver_data(device); 517 entry->data = acpi_driver_data(device);
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index f99ad05cd6a2..c2095ab7f0dd 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -82,7 +82,7 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr)
82 82
83 end: 83 end:
84 if (result) 84 if (result)
85 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to set limit\n")); 85 ACPI_ERROR((AE_INFO, "Unable to set limit"));
86 86
87 return_VALUE(result); 87 return_VALUE(result);
88} 88}
@@ -289,8 +289,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
289 289
290 result = acpi_processor_apply_limit(pr); 290 result = acpi_processor_apply_limit(pr);
291 if (result) 291 if (result)
292 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 292 ACPI_ERROR((AE_INFO, "Unable to set thermal limit"));
293 "Unable to set thermal limit\n"));
294 293
295 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n", 294 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
296 pr->limit.thermal.px, pr->limit.thermal.tx)); 295 pr->limit.thermal.px, pr->limit.thermal.tx));
@@ -362,25 +361,23 @@ static ssize_t acpi_processor_write_limit(struct file * file,
362 ACPI_FUNCTION_TRACE("acpi_processor_write_limit"); 361 ACPI_FUNCTION_TRACE("acpi_processor_write_limit");
363 362
364 if (!pr || (count > sizeof(limit_string) - 1)) { 363 if (!pr || (count > sizeof(limit_string) - 1)) {
365 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
366 return_VALUE(-EINVAL); 364 return_VALUE(-EINVAL);
367 } 365 }
368 366
369 if (copy_from_user(limit_string, buffer, count)) { 367 if (copy_from_user(limit_string, buffer, count)) {
370 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
371 return_VALUE(-EFAULT); 368 return_VALUE(-EFAULT);
372 } 369 }
373 370
374 limit_string[count] = '\0'; 371 limit_string[count] = '\0';
375 372
376 if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) { 373 if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
377 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n")); 374 ACPI_ERROR((AE_INFO, "Invalid data format"));
378 return_VALUE(-EINVAL); 375 return_VALUE(-EINVAL);
379 } 376 }
380 377
381 if (pr->flags.throttling) { 378 if (pr->flags.throttling) {
382 if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) { 379 if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
383 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid tx\n")); 380 ACPI_ERROR((AE_INFO, "Invalid tx"));
384 return_VALUE(-EINVAL); 381 return_VALUE(-EINVAL);
385 } 382 }
386 pr->limit.user.tx = tx; 383 pr->limit.user.tx = tx;
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index b966549ec000..97856ad28c18 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -196,7 +196,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
196 } 196 }
197 /* TBD: Support duty_cycle values that span bit 4. */ 197 /* TBD: Support duty_cycle values that span bit 4. */
198 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { 198 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
199 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "duty_cycle spans bit 4\n")); 199 ACPI_WARNING((AE_INFO, "duty_cycle spans bit 4"));
200 return_VALUE(0); 200 return_VALUE(0);
201 } 201 }
202 202
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f8316a05ede7..964ee5c8ea16 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -311,15 +311,14 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
311 /* _PRW */ 311 /* _PRW */
312 status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); 312 status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer);
313 if (ACPI_FAILURE(status)) { 313 if (ACPI_FAILURE(status)) {
314 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRW\n")); 314 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRW"));
315 goto end; 315 goto end;
316 } 316 }
317 317
318 package = (union acpi_object *)buffer.pointer; 318 package = (union acpi_object *)buffer.pointer;
319 status = acpi_bus_extract_wakeup_device_power_package(device, package); 319 status = acpi_bus_extract_wakeup_device_power_package(device, package);
320 if (ACPI_FAILURE(status)) { 320 if (ACPI_FAILURE(status)) {
321 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 321 ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package"));
322 "Error extracting _PRW package\n"));
323 goto end; 322 goto end;
324 } 323 }
325 324
@@ -970,7 +969,7 @@ acpi_add_single_object(struct acpi_device **child,
970 969
971 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); 970 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
972 if (!device) { 971 if (!device) {
973 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); 972 ACPI_ERROR((AE_INFO, "Memory allocation error"));
974 return_VALUE(-ENOMEM); 973 return_VALUE(-ENOMEM);
975 } 974 }
976 memset(device, 0, sizeof(struct acpi_device)); 975 memset(device, 0, sizeof(struct acpi_device));
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index a934ac42178d..56a746bad495 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -161,9 +161,6 @@ static int __init acpi_system_init(void)
161 return_VALUE(error); 161 return_VALUE(error);
162 162
163 Error: 163 Error:
164 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
165 "Unable to create '%s' proc fs entry\n", name));
166
167 remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir); 164 remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
168 remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir); 165 remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
169 remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir); 166 remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index e7fe3a14fdaf..44fffe16767e 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -325,7 +325,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
325 &tz->trips.critical.temperature); 325 &tz->trips.critical.temperature);
326 if (ACPI_FAILURE(status)) { 326 if (ACPI_FAILURE(status)) {
327 tz->trips.critical.flags.valid = 0; 327 tz->trips.critical.flags.valid = 0;
328 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n")); 328 ACPI_EXCEPTION((AE_INFO, status, "No critical threshold"));
329 return_VALUE(-ENODEV); 329 return_VALUE(-ENODEV);
330 } else { 330 } else {
331 tz->trips.critical.flags.valid = 1; 331 tz->trips.critical.flags.valid = 1;
@@ -384,8 +384,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
384 tz->trips.passive.flags.valid = 0; 384 tz->trips.passive.flags.valid = 0;
385 385
386 if (!tz->trips.passive.flags.valid) 386 if (!tz->trips.passive.flags.valid)
387 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 387 ACPI_WARNING((AE_INFO, "Invalid passive threshold"));
388 "Invalid passive threshold\n"));
389 else 388 else
390 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 389 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
391 "Found passive threshold [%lu]\n", 390 "Found passive threshold [%lu]\n",
@@ -414,9 +413,8 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
414 "Found active threshold [%d]:[%lu]\n", 413 "Found active threshold [%d]:[%lu]\n",
415 i, tz->trips.active[i].temperature)); 414 i, tz->trips.active[i].temperature));
416 } else 415 } else
417 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 416 ACPI_EXCEPTION((AE_INFO, status,
418 "Invalid active threshold [%d]\n", 417 "Invalid active threshold [%d]", i));
419 i));
420 } 418 }
421 419
422 return_VALUE(0); 420 return_VALUE(0);
@@ -471,7 +469,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
471 return_VALUE(-EINVAL); 469 return_VALUE(-EINVAL);
472 470
473 if (tz->temperature >= tz->trips.critical.temperature) { 471 if (tz->temperature >= tz->trips.critical.temperature) {
474 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Critical trip point\n")); 472 ACPI_WARNING((AE_INFO, "Critical trip point"));
475 tz->trips.critical.flags.enabled = 1; 473 tz->trips.critical.flags.enabled = 1;
476 } else if (tz->trips.critical.flags.enabled) 474 } else if (tz->trips.critical.flags.enabled)
477 tz->trips.critical.flags.enabled = 0; 475 tz->trips.critical.flags.enabled = 0;
@@ -502,7 +500,7 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
502 return_VALUE(-EINVAL); 500 return_VALUE(-EINVAL);
503 501
504 if (tz->temperature >= tz->trips.hot.temperature) { 502 if (tz->temperature >= tz->trips.hot.temperature) {
505 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Hot trip point\n")); 503 ACPI_WARNING((AE_INFO, "Hot trip point"));
506 tz->trips.hot.flags.enabled = 1; 504 tz->trips.hot.flags.enabled = 1;
507 } else if (tz->trips.hot.flags.enabled) 505 } else if (tz->trips.hot.flags.enabled)
508 tz->trips.hot.flags.enabled = 0; 506 tz->trips.hot.flags.enabled = 0;
@@ -642,10 +640,10 @@ static void acpi_thermal_active(struct acpi_thermal *tz)
642 handles[j], 640 handles[j],
643 ACPI_STATE_D0); 641 ACPI_STATE_D0);
644 if (result) { 642 if (result) {
645 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 643 ACPI_WARNING((AE_INFO,
646 "Unable to turn cooling device [%p] 'on'\n", 644 "Unable to turn cooling device [%p] 'on'",
647 active->devices. 645 active->devices.
648 handles[j])); 646 handles[j]));
649 continue; 647 continue;
650 } 648 }
651 active->flags.enabled = 1; 649 active->flags.enabled = 1;
@@ -667,9 +665,9 @@ static void acpi_thermal_active(struct acpi_thermal *tz)
667 result = acpi_bus_set_power(active->devices.handles[j], 665 result = acpi_bus_set_power(active->devices.handles[j],
668 ACPI_STATE_D3); 666 ACPI_STATE_D3);
669 if (result) { 667 if (result) {
670 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 668 ACPI_WARNING((AE_INFO,
671 "Unable to turn cooling device [%p] 'off'\n", 669 "Unable to turn cooling device [%p] 'off'",
672 active->devices.handles[j])); 670 active->devices.handles[j]));
673 continue; 671 continue;
674 } 672 }
675 active->flags.enabled = 0; 673 active->flags.enabled = 0;
@@ -700,7 +698,7 @@ static void acpi_thermal_check(void *data)
700 ACPI_FUNCTION_TRACE("acpi_thermal_check"); 698 ACPI_FUNCTION_TRACE("acpi_thermal_check");
701 699
702 if (!tz) { 700 if (!tz) {
703 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); 701 ACPI_ERROR((AE_INFO, "Invalid (NULL) context"));
704 return_VOID; 702 return_VOID;
705 } 703 }
706 704
@@ -949,13 +947,11 @@ acpi_thermal_write_trip_points(struct file *file,
949 } 947 }
950 948
951 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) { 949 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
952 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
953 count = -EINVAL; 950 count = -EINVAL;
954 goto end; 951 goto end;
955 } 952 }
956 953
957 if (copy_from_user(limit_string, buffer, count)) { 954 if (copy_from_user(limit_string, buffer, count)) {
958 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
959 count = -EFAULT; 955 count = -EFAULT;
960 goto end; 956 goto end;
961 } 957 }
@@ -968,7 +964,6 @@ acpi_thermal_write_trip_points(struct file *file,
968 &active[5], &active[6], &active[7], &active[8], 964 &active[5], &active[6], &active[7], &active[8],
969 &active[9]); 965 &active[9]);
970 if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) { 966 if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) {
971 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n"));
972 count = -EINVAL; 967 count = -EINVAL;
973 goto end; 968 goto end;
974 } 969 }
@@ -1128,9 +1123,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1128 entry = create_proc_entry(ACPI_THERMAL_FILE_STATE, 1123 entry = create_proc_entry(ACPI_THERMAL_FILE_STATE,
1129 S_IRUGO, acpi_device_dir(device)); 1124 S_IRUGO, acpi_device_dir(device));
1130 if (!entry) 1125 if (!entry)
1131 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1126 return_VALUE(-ENODEV);
1132 "Unable to create '%s' fs entry\n",
1133 ACPI_THERMAL_FILE_STATE));
1134 else { 1127 else {
1135 entry->proc_fops = &acpi_thermal_state_fops; 1128 entry->proc_fops = &acpi_thermal_state_fops;
1136 entry->data = acpi_driver_data(device); 1129 entry->data = acpi_driver_data(device);
@@ -1141,9 +1134,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1141 entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE, 1134 entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE,
1142 S_IRUGO, acpi_device_dir(device)); 1135 S_IRUGO, acpi_device_dir(device));
1143 if (!entry) 1136 if (!entry)
1144 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1137 return_VALUE(-ENODEV);
1145 "Unable to create '%s' fs entry\n",
1146 ACPI_THERMAL_FILE_TEMPERATURE));
1147 else { 1138 else {
1148 entry->proc_fops = &acpi_thermal_temp_fops; 1139 entry->proc_fops = &acpi_thermal_temp_fops;
1149 entry->data = acpi_driver_data(device); 1140 entry->data = acpi_driver_data(device);
@@ -1155,9 +1146,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1155 S_IFREG | S_IRUGO | S_IWUSR, 1146 S_IFREG | S_IRUGO | S_IWUSR,
1156 acpi_device_dir(device)); 1147 acpi_device_dir(device));
1157 if (!entry) 1148 if (!entry)
1158 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1149 return_VALUE(-ENODEV);
1159 "Unable to create '%s' fs entry\n",
1160 ACPI_THERMAL_FILE_TRIP_POINTS));
1161 else { 1150 else {
1162 entry->proc_fops = &acpi_thermal_trip_fops; 1151 entry->proc_fops = &acpi_thermal_trip_fops;
1163 entry->data = acpi_driver_data(device); 1152 entry->data = acpi_driver_data(device);
@@ -1169,9 +1158,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1169 S_IFREG | S_IRUGO | S_IWUSR, 1158 S_IFREG | S_IRUGO | S_IWUSR,
1170 acpi_device_dir(device)); 1159 acpi_device_dir(device));
1171 if (!entry) 1160 if (!entry)
1172 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1161 return_VALUE(-ENODEV);
1173 "Unable to create '%s' fs entry\n",
1174 ACPI_THERMAL_FILE_COOLING_MODE));
1175 else { 1162 else {
1176 entry->proc_fops = &acpi_thermal_cooling_fops; 1163 entry->proc_fops = &acpi_thermal_cooling_fops;
1177 entry->data = acpi_driver_data(device); 1164 entry->data = acpi_driver_data(device);
@@ -1183,9 +1170,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1183 S_IFREG | S_IRUGO | S_IWUSR, 1170 S_IFREG | S_IRUGO | S_IWUSR,
1184 acpi_device_dir(device)); 1171 acpi_device_dir(device));
1185 if (!entry) 1172 if (!entry)
1186 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1173 return_VALUE(-ENODEV);
1187 "Unable to create '%s' fs entry\n",
1188 ACPI_THERMAL_FILE_POLLING_FREQ));
1189 else { 1174 else {
1190 entry->proc_fops = &acpi_thermal_polling_fops; 1175 entry->proc_fops = &acpi_thermal_polling_fops;
1191 entry->data = acpi_driver_data(device); 1176 entry->data = acpi_driver_data(device);
@@ -1355,8 +1340,6 @@ static int acpi_thermal_add(struct acpi_device *device)
1355 ACPI_DEVICE_NOTIFY, 1340 ACPI_DEVICE_NOTIFY,
1356 acpi_thermal_notify, tz); 1341 acpi_thermal_notify, tz);
1357 if (ACPI_FAILURE(status)) { 1342 if (ACPI_FAILURE(status)) {
1358 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1359 "Error installing notify handler\n"));
1360 result = -ENODEV; 1343 result = -ENODEV;
1361 goto end; 1344 goto end;
1362 } 1345 }
@@ -1398,9 +1381,6 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
1398 status = acpi_remove_notify_handler(tz->handle, 1381 status = acpi_remove_notify_handler(tz->handle,
1399 ACPI_DEVICE_NOTIFY, 1382 ACPI_DEVICE_NOTIFY,
1400 acpi_thermal_notify); 1383 acpi_thermal_notify);
1401 if (ACPI_FAILURE(status))
1402 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1403 "Error removing notify handler\n"));
1404 1384
1405 /* Terminate policy */ 1385 /* Terminate policy */
1406 if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) { 1386 if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) {
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 6b516852ac12..ce093d4516ba 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -62,26 +62,25 @@ acpi_extract_package(union acpi_object *package,
62 62
63 if (!package || (package->type != ACPI_TYPE_PACKAGE) 63 if (!package || (package->type != ACPI_TYPE_PACKAGE)
64 || (package->package.count < 1)) { 64 || (package->package.count < 1)) {
65 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 65 ACPI_WARNING((AE_INFO, "Invalid package argument"));
66 "Invalid 'package' argument\n"));
67 return_ACPI_STATUS(AE_BAD_PARAMETER); 66 return_ACPI_STATUS(AE_BAD_PARAMETER);
68 } 67 }
69 68
70 if (!format || !format->pointer || (format->length < 1)) { 69 if (!format || !format->pointer || (format->length < 1)) {
71 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'format' argument\n")); 70 ACPI_WARNING((AE_INFO, "Invalid format argument"));
72 return_ACPI_STATUS(AE_BAD_PARAMETER); 71 return_ACPI_STATUS(AE_BAD_PARAMETER);
73 } 72 }
74 73
75 if (!buffer) { 74 if (!buffer) {
76 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'buffer' argument\n")); 75 ACPI_WARNING((AE_INFO, "Invalid buffer argument"));
77 return_ACPI_STATUS(AE_BAD_PARAMETER); 76 return_ACPI_STATUS(AE_BAD_PARAMETER);
78 } 77 }
79 78
80 format_count = (format->length / sizeof(char)) - 1; 79 format_count = (format->length / sizeof(char)) - 1;
81 if (format_count > package->package.count) { 80 if (format_count > package->package.count) {
82 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 81 ACPI_WARNING((AE_INFO, "Format specifies more objects [%d]"
83 "Format specifies more objects [%d] than exist in package [%d].", 82 " than exist in package [%d].",
84 format_count, package->package.count)); 83 format_count, package->package.count));
85 return_ACPI_STATUS(AE_BAD_DATA); 84 return_ACPI_STATUS(AE_BAD_DATA);
86 } 85 }
87 86
@@ -113,9 +112,10 @@ acpi_extract_package(union acpi_object *package,
113 tail_offset += sizeof(char *); 112 tail_offset += sizeof(char *);
114 break; 113 break;
115 default: 114 default:
116 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 115 ACPI_WARNING((AE_INFO, "Invalid package element"
117 "Invalid package element [%d]: got number, expecing [%c].\n", 116 " [%d]: got number, expecing"
118 i, format_string[i])); 117 " [%c]",
118 i, format_string[i]));
119 return_ACPI_STATUS(AE_BAD_DATA); 119 return_ACPI_STATUS(AE_BAD_DATA);
120 break; 120 break;
121 } 121 }
@@ -138,9 +138,10 @@ acpi_extract_package(union acpi_object *package,
138 tail_offset += sizeof(u8 *); 138 tail_offset += sizeof(u8 *);
139 break; 139 break;
140 default: 140 default:
141 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 141 ACPI_WARNING((AE_INFO, "Invalid package element"
142 "Invalid package element [%d] got string/buffer, expecing [%c].\n", 142 " [%d] got string/buffer,"
143 i, format_string[i])); 143 " expecing [%c]",
144 i, format_string[i]));
144 return_ACPI_STATUS(AE_BAD_DATA); 145 return_ACPI_STATUS(AE_BAD_DATA);
145 break; 146 break;
146 } 147 }
@@ -325,7 +326,7 @@ acpi_evaluate_string(acpi_handle handle,
325 326
326 *data = kmalloc(element->string.length + 1, GFP_KERNEL); 327 *data = kmalloc(element->string.length + 1, GFP_KERNEL);
327 if (!data) { 328 if (!data) {
328 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); 329 ACPI_ERROR((AE_INFO, "Memory allocation"));
329 return_VALUE(-ENOMEM); 330 return_VALUE(-ENOMEM);
330 } 331 }
331 memset(*data, 0, element->string.length + 1); 332 memset(*data, 0, element->string.length + 1);
@@ -367,25 +368,22 @@ acpi_evaluate_reference(acpi_handle handle,
367 package = (union acpi_object *)buffer.pointer; 368 package = (union acpi_object *)buffer.pointer;
368 369
369 if ((buffer.length == 0) || !package) { 370 if ((buffer.length == 0) || !package) {
370 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 371 ACPI_ERROR((AE_INFO, "No return object (len %X ptr %p)",
371 "No return object (len %X ptr %p)\n", 372 (unsigned)buffer.length, package));
372 (unsigned)buffer.length, package));
373 status = AE_BAD_DATA; 373 status = AE_BAD_DATA;
374 acpi_util_eval_error(handle, pathname, status); 374 acpi_util_eval_error(handle, pathname, status);
375 goto end; 375 goto end;
376 } 376 }
377 if (package->type != ACPI_TYPE_PACKAGE) { 377 if (package->type != ACPI_TYPE_PACKAGE) {
378 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 378 ACPI_ERROR((AE_INFO, "Expecting a [Package], found type %X",
379 "Expecting a [Package], found type %X\n", 379 package->type));
380 package->type));
381 status = AE_BAD_DATA; 380 status = AE_BAD_DATA;
382 acpi_util_eval_error(handle, pathname, status); 381 acpi_util_eval_error(handle, pathname, status);
383 goto end; 382 goto end;
384 } 383 }
385 if (!package->package.count) { 384 if (!package->package.count) {
386 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 385 ACPI_ERROR((AE_INFO, "[Package] has zero elements (%p)",
387 "[Package] has zero elements (%p)\n", 386 package));
388 package));
389 status = AE_BAD_DATA; 387 status = AE_BAD_DATA;
390 acpi_util_eval_error(handle, pathname, status); 388 acpi_util_eval_error(handle, pathname, status);
391 goto end; 389 goto end;
@@ -404,9 +402,9 @@ acpi_evaluate_reference(acpi_handle handle,
404 402
405 if (element->type != ACPI_TYPE_ANY) { 403 if (element->type != ACPI_TYPE_ANY) {
406 status = AE_BAD_DATA; 404 status = AE_BAD_DATA;
407 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 405 ACPI_ERROR((AE_INFO,
408 "Expecting a [Reference] package element, found type %X\n", 406 "Expecting a [Reference] package element, found type %X",
409 element->type)); 407 element->type));
410 acpi_util_eval_error(handle, pathname, status); 408 acpi_util_eval_error(handle, pathname, status);
411 break; 409 break;
412 } 410 }
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index e7e9a693953a..7854a4a9572b 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -324,7 +324,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device,
324 return_VALUE(status); 324 return_VALUE(status);
325 obj = (union acpi_object *)buffer.pointer; 325 obj = (union acpi_object *)buffer.pointer;
326 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { 326 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
327 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); 327 ACPI_ERROR((AE_INFO, "Invalid _BCL data"));
328 status = -EFAULT; 328 status = -EFAULT;
329 goto err; 329 goto err;
330 } 330 }
@@ -399,7 +399,7 @@ acpi_video_device_EDID(struct acpi_video_device *device,
399 if (obj && obj->type == ACPI_TYPE_BUFFER) 399 if (obj && obj->type == ACPI_TYPE_BUFFER)
400 *edid = obj; 400 *edid = obj;
401 else { 401 else {
402 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DDC data\n")); 402 ACPI_ERROR((AE_INFO, "Invalid _DDC data"));
403 status = -EFAULT; 403 status = -EFAULT;
404 kfree(obj); 404 kfree(obj);
405 } 405 }
@@ -560,8 +560,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
560 o = (union acpi_object *)&obj->package. 560 o = (union acpi_object *)&obj->package.
561 elements[i]; 561 elements[i];
562 if (o->type != ACPI_TYPE_INTEGER) { 562 if (o->type != ACPI_TYPE_INTEGER) {
563 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 563 ACPI_ERROR((AE_INFO, "Invalid data"));
564 "Invalid data\n"));
565 continue; 564 continue;
566 } 565 }
567 br->levels[count] = (u32) o->integer.value; 566 br->levels[count] = (u32) o->integer.value;
@@ -904,8 +903,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
904 /* 'info' [R] */ 903 /* 'info' [R] */
905 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 904 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device));
906 if (!entry) 905 if (!entry)
907 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 906 return_VALUE(-ENODEV);
908 "Unable to create 'info' fs entry\n"));
909 else { 907 else {
910 entry->proc_fops = &acpi_video_device_info_fops; 908 entry->proc_fops = &acpi_video_device_info_fops;
911 entry->data = acpi_driver_data(device); 909 entry->data = acpi_driver_data(device);
@@ -917,8 +915,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
917 create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, 915 create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR,
918 acpi_device_dir(device)); 916 acpi_device_dir(device));
919 if (!entry) 917 if (!entry)
920 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 918 return_VALUE(-ENODEV);
921 "Unable to create 'state' fs entry\n"));
922 else { 919 else {
923 acpi_video_device_state_fops.write = acpi_video_device_write_state; 920 acpi_video_device_state_fops.write = acpi_video_device_write_state;
924 entry->proc_fops = &acpi_video_device_state_fops; 921 entry->proc_fops = &acpi_video_device_state_fops;
@@ -931,8 +928,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
931 create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, 928 create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR,
932 acpi_device_dir(device)); 929 acpi_device_dir(device));
933 if (!entry) 930 if (!entry)
934 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 931 return_VALUE(-ENODEV);
935 "Unable to create 'brightness' fs entry\n"));
936 else { 932 else {
937 acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; 933 acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness;
938 entry->proc_fops = &acpi_video_device_brightness_fops; 934 entry->proc_fops = &acpi_video_device_brightness_fops;
@@ -943,8 +939,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
943 /* 'EDID' [R] */ 939 /* 'EDID' [R] */
944 entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); 940 entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device));
945 if (!entry) 941 if (!entry)
946 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 942 return_VALUE(-ENODEV);
947 "Unable to create 'brightness' fs entry\n"));
948 else { 943 else {
949 entry->proc_fops = &acpi_video_device_EDID_fops; 944 entry->proc_fops = &acpi_video_device_EDID_fops;
950 entry->data = acpi_driver_data(device); 945 entry->data = acpi_driver_data(device);
@@ -1200,8 +1195,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1200 /* 'info' [R] */ 1195 /* 'info' [R] */
1201 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 1196 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device));
1202 if (!entry) 1197 if (!entry)
1203 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1198 return_VALUE(-ENODEV);
1204 "Unable to create 'info' fs entry\n"));
1205 else { 1199 else {
1206 entry->proc_fops = &acpi_video_bus_info_fops; 1200 entry->proc_fops = &acpi_video_bus_info_fops;
1207 entry->data = acpi_driver_data(device); 1201 entry->data = acpi_driver_data(device);
@@ -1211,8 +1205,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1211 /* 'ROM' [R] */ 1205 /* 'ROM' [R] */
1212 entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); 1206 entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device));
1213 if (!entry) 1207 if (!entry)
1214 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1208 return_VALUE(-ENODEV);
1215 "Unable to create 'ROM' fs entry\n"));
1216 else { 1209 else {
1217 entry->proc_fops = &acpi_video_bus_ROM_fops; 1210 entry->proc_fops = &acpi_video_bus_ROM_fops;
1218 entry->data = acpi_driver_data(device); 1211 entry->data = acpi_driver_data(device);
@@ -1223,8 +1216,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1223 entry = 1216 entry =
1224 create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); 1217 create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device));
1225 if (!entry) 1218 if (!entry)
1226 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1219 return_VALUE(-ENODEV);
1227 "Unable to create 'POST_info' fs entry\n"));
1228 else { 1220 else {
1229 entry->proc_fops = &acpi_video_bus_POST_info_fops; 1221 entry->proc_fops = &acpi_video_bus_POST_info_fops;
1230 entry->data = acpi_driver_data(device); 1222 entry->data = acpi_driver_data(device);
@@ -1236,8 +1228,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1236 create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, 1228 create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR,
1237 acpi_device_dir(device)); 1229 acpi_device_dir(device));
1238 if (!entry) 1230 if (!entry)
1239 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1231 return_VALUE(-ENODEV);
1240 "Unable to create 'POST' fs entry\n"));
1241 else { 1232 else {
1242 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; 1233 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
1243 entry->proc_fops = &acpi_video_bus_POST_fops; 1234 entry->proc_fops = &acpi_video_bus_POST_fops;
@@ -1250,8 +1241,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1250 create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, 1241 create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR,
1251 acpi_device_dir(device)); 1242 acpi_device_dir(device));
1252 if (!entry) 1243 if (!entry)
1253 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1244 return_VALUE(-ENODEV);
1254 "Unable to create 'DOS' fs entry\n"));
1255 else { 1245 else {
1256 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; 1246 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
1257 entry->proc_fops = &acpi_video_bus_DOS_fops; 1247 entry->proc_fops = &acpi_video_bus_DOS_fops;
@@ -1446,13 +1436,13 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1446 1436
1447 status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); 1437 status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer);
1448 if (!ACPI_SUCCESS(status)) { 1438 if (!ACPI_SUCCESS(status)) {
1449 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n")); 1439 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
1450 return_VALUE(status); 1440 return_VALUE(status);
1451 } 1441 }
1452 1442
1453 dod = (union acpi_object *)buffer.pointer; 1443 dod = (union acpi_object *)buffer.pointer;
1454 if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { 1444 if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) {
1455 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); 1445 ACPI_EXCEPTION((AE_INFO, status, "Invalid _DOD data"));
1456 status = -EFAULT; 1446 status = -EFAULT;
1457 goto out; 1447 goto out;
1458 } 1448 }
@@ -1476,8 +1466,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1476 obj = (union acpi_object *)&dod->package.elements[i]; 1466 obj = (union acpi_object *)&dod->package.elements[i];
1477 1467
1478 if (obj->type != ACPI_TYPE_INTEGER) { 1468 if (obj->type != ACPI_TYPE_INTEGER) {
1479 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1469 ACPI_ERROR((AE_INFO, "Invalid _DOD data"));
1480 "Invalid _DOD data\n"));
1481 active_device_list[i].value.int_val = 1470 active_device_list[i].value.int_val =
1482 ACPI_VIDEO_HEAD_INVALID; 1471 ACPI_VIDEO_HEAD_INVALID;
1483 } 1472 }
@@ -1591,8 +1580,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
1591 1580
1592 status = acpi_video_bus_get_one_device(dev, video); 1581 status = acpi_video_bus_get_one_device(dev, video);
1593 if (ACPI_FAILURE(status)) { 1582 if (ACPI_FAILURE(status)) {
1594 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1583 ACPI_EXCEPTION((AE_INFO, status, "Cant attach device"));
1595 "Cant attach device\n"));
1596 continue; 1584 continue;
1597 } 1585 }
1598 1586
@@ -1620,9 +1608,6 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
1620 status = acpi_remove_notify_handler(device->handle, 1608 status = acpi_remove_notify_handler(device->handle,
1621 ACPI_DEVICE_NOTIFY, 1609 ACPI_DEVICE_NOTIFY,
1622 acpi_video_device_notify); 1610 acpi_video_device_notify);
1623 if (ACPI_FAILURE(status))
1624 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1625 "Error removing notify handler\n"));
1626 1611
1627 return_VALUE(0); 1612 return_VALUE(0);
1628} 1613}
@@ -1826,9 +1811,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
1826 status = acpi_remove_notify_handler(video->handle, 1811 status = acpi_remove_notify_handler(video->handle,
1827 ACPI_DEVICE_NOTIFY, 1812 ACPI_DEVICE_NOTIFY,
1828 acpi_video_bus_notify); 1813 acpi_video_bus_notify);
1829 if (ACPI_FAILURE(status))
1830 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1831 "Error removing notify handler\n"));
1832 1814
1833 acpi_video_bus_put_devices(video); 1815 acpi_video_bus_put_devices(video);
1834 acpi_video_bus_remove_fs(device); 1816 acpi_video_bus_remove_fs(device);