diff options
| -rw-r--r-- | drivers/acpi/power.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 67dedeed144..792a8309d07 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
| @@ -465,10 +465,12 @@ int acpi_power_transition(struct acpi_device *device, int state) | |||
| 465 | struct acpi_handle_list *tl = NULL; /* Target Resources */ | 465 | struct acpi_handle_list *tl = NULL; /* Target Resources */ |
| 466 | int i = 0; | 466 | int i = 0; |
| 467 | 467 | ||
| 468 | |||
| 469 | if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) | 468 | if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) |
| 470 | return -EINVAL; | 469 | return -EINVAL; |
| 471 | 470 | ||
| 471 | if (device->power.state == state) | ||
| 472 | return 0; | ||
| 473 | |||
| 472 | if ((device->power.state < ACPI_STATE_D0) | 474 | if ((device->power.state < ACPI_STATE_D0) |
| 473 | || (device->power.state > ACPI_STATE_D3)) | 475 | || (device->power.state > ACPI_STATE_D3)) |
| 474 | return -ENODEV; | 476 | return -ENODEV; |
| @@ -488,10 +490,6 @@ int acpi_power_transition(struct acpi_device *device, int state) | |||
| 488 | goto end; | 490 | goto end; |
| 489 | } | 491 | } |
| 490 | 492 | ||
| 491 | if (device->power.state == state) { | ||
| 492 | goto end; | ||
| 493 | } | ||
| 494 | |||
| 495 | /* | 493 | /* |
| 496 | * Then we dereference all power resources used in the current list. | 494 | * Then we dereference all power resources used in the current list. |
| 497 | */ | 495 | */ |
