diff options
author | Joe Perches <joe@perches.com> | 2013-02-22 02:37:36 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-03-04 08:23:39 -0500 |
commit | ed4cf5b23f9d21c441e5c8feead86f2e4a436923 (patch) | |
tree | b406b43d8dbaac5913b7cd0a2851a6c935422b03 /drivers/acpi | |
parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) |
ACPI / Sleep: Avoid interleaved message on errors
Got this dmesg log on an Acer Aspire 725.
[ 0.256351] ACPI: (supports S0ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20130117/hwxface-568)
[ 0.256373] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
[ 0.256391] S3 S4 S5)
Avoid this interleaving error messages.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/sleep.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 6d3a06a629a1..24213033fbae 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -599,7 +599,6 @@ static void acpi_sleep_suspend_setup(void) | |||
599 | status = acpi_get_sleep_type_data(i, &type_a, &type_b); | 599 | status = acpi_get_sleep_type_data(i, &type_a, &type_b); |
600 | if (ACPI_SUCCESS(status)) { | 600 | if (ACPI_SUCCESS(status)) { |
601 | sleep_states[i] = 1; | 601 | sleep_states[i] = 1; |
602 | pr_cont(" S%d", i); | ||
603 | } | 602 | } |
604 | } | 603 | } |
605 | 604 | ||
@@ -742,7 +741,6 @@ static void acpi_sleep_hibernate_setup(void) | |||
742 | hibernation_set_ops(old_suspend_ordering ? | 741 | hibernation_set_ops(old_suspend_ordering ? |
743 | &acpi_hibernation_ops_old : &acpi_hibernation_ops); | 742 | &acpi_hibernation_ops_old : &acpi_hibernation_ops); |
744 | sleep_states[ACPI_STATE_S4] = 1; | 743 | sleep_states[ACPI_STATE_S4] = 1; |
745 | pr_cont(KERN_CONT " S4"); | ||
746 | if (nosigcheck) | 744 | if (nosigcheck) |
747 | return; | 745 | return; |
748 | 746 | ||
@@ -788,6 +786,9 @@ int __init acpi_sleep_init(void) | |||
788 | { | 786 | { |
789 | acpi_status status; | 787 | acpi_status status; |
790 | u8 type_a, type_b; | 788 | u8 type_a, type_b; |
789 | char supported[ACPI_S_STATE_COUNT * 3 + 1]; | ||
790 | char *pos = supported; | ||
791 | int i; | ||
791 | 792 | ||
792 | if (acpi_disabled) | 793 | if (acpi_disabled) |
793 | return 0; | 794 | return 0; |
@@ -795,7 +796,6 @@ int __init acpi_sleep_init(void) | |||
795 | acpi_sleep_dmi_check(); | 796 | acpi_sleep_dmi_check(); |
796 | 797 | ||
797 | sleep_states[ACPI_STATE_S0] = 1; | 798 | sleep_states[ACPI_STATE_S0] = 1; |
798 | pr_info(PREFIX "(supports S0"); | ||
799 | 799 | ||
800 | acpi_sleep_suspend_setup(); | 800 | acpi_sleep_suspend_setup(); |
801 | acpi_sleep_hibernate_setup(); | 801 | acpi_sleep_hibernate_setup(); |
@@ -803,11 +803,17 @@ int __init acpi_sleep_init(void) | |||
803 | status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b); | 803 | status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b); |
804 | if (ACPI_SUCCESS(status)) { | 804 | if (ACPI_SUCCESS(status)) { |
805 | sleep_states[ACPI_STATE_S5] = 1; | 805 | sleep_states[ACPI_STATE_S5] = 1; |
806 | pr_cont(" S5"); | ||
807 | pm_power_off_prepare = acpi_power_off_prepare; | 806 | pm_power_off_prepare = acpi_power_off_prepare; |
808 | pm_power_off = acpi_power_off; | 807 | pm_power_off = acpi_power_off; |
809 | } | 808 | } |
810 | pr_cont(")\n"); | 809 | |
810 | supported[0] = 0; | ||
811 | for (i = 0; i < ACPI_S_STATE_COUNT; i++) { | ||
812 | if (sleep_states[i]) | ||
813 | pos += sprintf(pos, " S%d", i); | ||
814 | } | ||
815 | pr_info(PREFIX "(supports%s)\n", supported); | ||
816 | |||
811 | /* | 817 | /* |
812 | * Register the tts_notifier to reboot notifier list so that the _TTS | 818 | * Register the tts_notifier to reboot notifier list so that the _TTS |
813 | * object can also be evaluated when the system enters S5. | 819 | * object can also be evaluated when the system enters S5. |