aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r--drivers/acpi/power.c22
1 files changed, 8 insertions, 14 deletions
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);