Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128045
b: refs/heads/master
c: 60a4ce7
h: refs/heads/master
i:
  128043: 98770cc
v: v3
  • Loading branch information
Lin Ming authored and Len Brown committed Dec 31, 2008
1 parent d231dd7 commit df786aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30823736162ff91512965e3c730557e34fa71d6d
refs/heads/master: 60a4ce7f4148155d3f28eea4a213f7ee47cd57b7
6 changes: 5 additions & 1 deletion trunk/drivers/acpi/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ static int acpi_power_get_state(acpi_handle handle, int *state)
{
acpi_status status = AE_OK;
unsigned long long sta = 0;
char node_name[5];
struct acpi_buffer buffer = { sizeof(node_name), node_name };


if (!handle || !state)
Expand All @@ -151,8 +153,10 @@ static int acpi_power_get_state(acpi_handle handle, int *state)
*state = (sta & 0x01)?ACPI_POWER_RESOURCE_STATE_ON:
ACPI_POWER_RESOURCE_STATE_OFF;

acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer);

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n",
acpi_ut_get_node_name(handle),
node_name,
*state ? "on" : "off"));

return 0;
Expand Down

0 comments on commit df786aa

Please sign in to comment.