Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350925
b: refs/heads/master
c: ad0c3b0
h: refs/heads/master
i:
  350923: c019c79
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 17, 2013
1 parent 44ea363 commit 1a6491a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 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: ff0c41942fd9766a158502d8ed6965c8a7726f53
refs/heads/master: ad0c3b0e4863185a9f8874a655a8d2999c915131
15 changes: 12 additions & 3 deletions trunk/drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,16 @@ static const char *state_string(int state)
}
}

static int __acpi_bus_get_power(struct acpi_device *device, int *state)
/**
* acpi_device_get_power - Get power state of an ACPI device.
* @device: Device to get the power state of.
* @state: Place to store the power state of the device.
*
* This function does not update the device's power.state field, but it may
* update its parent's power.state field (when the parent's power state is
* unknown and the device's power state turns out to be D0).
*/
int acpi_device_get_power(struct acpi_device *device, int *state)
{
int result = ACPI_STATE_UNKNOWN;

Expand Down Expand Up @@ -397,7 +406,7 @@ int acpi_bus_init_power(struct acpi_device *device)

device->power.state = ACPI_STATE_UNKNOWN;

result = __acpi_bus_get_power(device, &state);
result = acpi_device_get_power(device, &state);
if (result)
return result;

Expand All @@ -421,7 +430,7 @@ int acpi_bus_update_power(acpi_handle handle, int *state_p)
if (result)
return result;

result = __acpi_bus_get_power(device, &state);
result = acpi_device_get_power(device, &state);
if (result)
return result;

Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle,
unsigned long long *sta);
int acpi_bus_get_status(struct acpi_device *device);
int acpi_bus_set_power(acpi_handle handle, int state);
int acpi_device_get_power(struct acpi_device *device, int *state);
int acpi_device_set_power(struct acpi_device *device, int state);
int acpi_bus_update_power(acpi_handle handle, int *state_p);
bool acpi_bus_power_manageable(acpi_handle handle);
Expand Down

0 comments on commit 1a6491a

Please sign in to comment.