Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31997
b: refs/heads/master
c: 4159857
h: refs/heads/master
i:
  31995: 89100df
v: v3
  • Loading branch information
Patrick Mochel authored and Len Brown committed Jun 30, 2006
1 parent 632663e commit e8bbd09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 8348e1b19a06b1932f65e84e1d59be29e1626c2b
refs/heads/master: 415985728895ba3127116bc4f999caf94420ed85
12 changes: 5 additions & 7 deletions trunk/drivers/acpi/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static struct acpi_driver acpi_power_driver = {

struct acpi_power_resource {
acpi_handle handle;
struct acpi_device * device;
acpi_bus_id name;
u32 system_level;
u32 order;
Expand Down Expand Up @@ -203,10 +204,8 @@ static int acpi_power_on(acpi_handle handle)
return -ENOEXEC;

/* Update the power resource's _device_ power state */
result = acpi_bus_get_device(resource->handle, &device);
if (result)
return result;
device->power.state = ACPI_STATE_D0;
device = resource->device;
resource->device->power.state = ACPI_STATE_D0;

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned on\n",
resource->name));
Expand Down Expand Up @@ -253,9 +252,7 @@ static int acpi_power_off_device(acpi_handle handle)
return -ENOEXEC;

/* Update the power resource's _device_ power state */
result = acpi_bus_get_device(resource->handle, &device);
if (result)
return result;
device = resource->device;
device->power.state = ACPI_STATE_D3;

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned off\n",
Expand Down Expand Up @@ -545,6 +542,7 @@ static int acpi_power_add(struct acpi_device *device)
memset(resource, 0, sizeof(struct acpi_power_resource));

resource->handle = device->handle;
resource->device = device;
strcpy(resource->name, device->pnp.bus_id);
strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_POWER_CLASS);
Expand Down

0 comments on commit e8bbd09

Please sign in to comment.