Lines 660-666
int acpi_power_on_resources(struct acpi_
Link Here
|
660 |
|
660 |
|
661 |
int acpi_power_transition(struct acpi_device *device, int state) |
661 |
int acpi_power_transition(struct acpi_device *device, int state) |
662 |
{ |
662 |
{ |
663 |
int result; |
663 |
int result = 0; |
664 |
|
664 |
|
665 |
if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD)) |
665 |
if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD)) |
666 |
return -EINVAL; |
666 |
return -EINVAL; |
Lines 679-686
int acpi_power_transition(struct acpi_de
Link Here
|
679 |
* (e.g. so the device doesn't lose power while transitioning). Then, |
679 |
* (e.g. so the device doesn't lose power while transitioning). Then, |
680 |
* we dereference all power resources used in the current list. |
680 |
* we dereference all power resources used in the current list. |
681 |
*/ |
681 |
*/ |
682 |
result = acpi_power_on_list(&device->power.states[state].resources); |
682 |
if (state < ACPI_STATE_D3_COLD) |
683 |
if (!result) |
683 |
result = acpi_power_on_list( |
|
|
684 |
&device->power.states[state].resources); |
685 |
|
686 |
if (!result && device->power.state < ACPI_STATE_D3_COLD) |
684 |
acpi_power_off_list( |
687 |
acpi_power_off_list( |
685 |
&device->power.states[device->power.state].resources); |
688 |
&device->power.states[device->power.state].resources); |
686 |
|
689 |
|