Message ID | 1519156753-16950-1-git-send-email-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | acpi: acpiinfo: add acpi 6 to acpiinfo test | expand |
On 02/21/2018 03:59 AM, Alex Hung wrote: > This patch also fixes spacing errors. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/acpiinfo/acpiinfo.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c > index 5991b7f..5081850 100644 > --- a/src/acpi/acpiinfo/acpiinfo.c > +++ b/src/acpi/acpiinfo/acpiinfo.c > @@ -75,11 +75,13 @@ static int acpiinfo_test1(fwts_framework *fw) > int version; > int yearmonth; > > - fwts_chop_newline(str); > + fwts_chop_newline(str); > > sscanf(str, "%6d", &yearmonth); > > - if (yearmonth > 201110) { > + if (yearmonth > 201505) { > + version = 6; > + } else if (yearmonth > 201110) { > version = 5; > } else if (yearmonth > 200906) { > version = 4; > @@ -89,9 +91,9 @@ static int acpiinfo_test1(fwts_framework *fw) > version = 2; > } > > - fwts_log_info(fw, "Kernel ACPICA driver version: %s, supports ACPI %d.0", str, version); > - free(str); > - } > + fwts_log_info(fw, "Kernel ACPICA driver version: %s, supports ACPI %d.0", str, version); > + free(str); > + } > > fwts_infoonly(fw); > > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/acpiinfo/acpiinfo.c b/src/acpi/acpiinfo/acpiinfo.c index 5991b7f..5081850 100644 --- a/src/acpi/acpiinfo/acpiinfo.c +++ b/src/acpi/acpiinfo/acpiinfo.c @@ -75,11 +75,13 @@ static int acpiinfo_test1(fwts_framework *fw) int version; int yearmonth; - fwts_chop_newline(str); + fwts_chop_newline(str); sscanf(str, "%6d", &yearmonth); - if (yearmonth > 201110) { + if (yearmonth > 201505) { + version = 6; + } else if (yearmonth > 201110) { version = 5; } else if (yearmonth > 200906) { version = 4; @@ -89,9 +91,9 @@ static int acpiinfo_test1(fwts_framework *fw) version = 2; } - fwts_log_info(fw, "Kernel ACPICA driver version: %s, supports ACPI %d.0", str, version); - free(str); - } + fwts_log_info(fw, "Kernel ACPICA driver version: %s, supports ACPI %d.0", str, version); + free(str); + } fwts_infoonly(fw);
This patch also fixes spacing errors. Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/acpiinfo/acpiinfo.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)