ACK: [PATCH] acpi: method: check _WAK & _PTS for supported sleep states only
ivanhu
ivan.hu at canonical.com
Tue May 23 08:11:38 UTC 2017
On 05/18/2017 03:04 AM, Alex Hung wrote:
> Often not all sleep states are supported. For example, S1 & S2
> aren't usually supported by any systems and S3 & S4 aren't usually
> supported by servers.
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/acpi/method/method.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 61427ec..068aa5e 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -6383,6 +6383,11 @@ static int method_test_PTS(fwts_framework *fw)
>
> for (i = 1; i < 6; i++) {
> ACPI_OBJECT arg[1];
> + char name[6];
> +
> + snprintf(name, sizeof(name), "_S%1d_", i);
> + if (fwts_acpi_object_exists(name) == NULL)
> + continue;
>
> arg[0].Type = ACPI_TYPE_INTEGER;
> arg[0].Integer.Value = i;
> @@ -6457,6 +6462,12 @@ static int method_test_WAK(fwts_framework *fw)
>
> for (i = 1; i < 6; i++) {
> ACPI_OBJECT arg[1];
> + char name[6];
> +
> + snprintf(name, sizeof(name), "_S%1d_", i);
> + if (fwts_acpi_object_exists(name) == NULL)
> + continue;
> +
> arg[0].Type = ACPI_TYPE_INTEGER;
> arg[0].Integer.Value = i;
> fwts_log_info(fw, "Test _WAK(%d) System Wake, State S%d.", i, i);
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20170523/316b36e7/attachment.html>
More information about the fwts-devel
mailing list