[PATCH] acpi/method/battery: check method returning integer 0 & 1
Alex Hung
alex.hung at canonical.com
Thu May 7 01:17:11 UTC 2020
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/devices/battery/battery.c | 4 ++--
src/acpi/method/method.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/acpi/devices/battery/battery.c b/src/acpi/devices/battery/battery.c
index 74565169..72d8e377 100644
--- a/src/acpi/devices/battery/battery.c
+++ b/src/acpi/devices/battery/battery.c
@@ -449,7 +449,7 @@ static int method_test_BMA(fwts_framework *fw)
arg[0].Integer.Value = 1;
return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device,
- "_BMA", arg, 1, fwts_method_test_integer_return, NULL);
+ "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA");
}
static int method_test_BMS(fwts_framework *fw)
@@ -459,7 +459,7 @@ static int method_test_BMS(fwts_framework *fw)
arg[0].Integer.Value = 1;
return fwts_evaluate_method(fw, METHOD_OPTIONAL, &device,
- "_BMS", arg, 1, fwts_method_test_integer_return, NULL);
+ "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS");
}
static void method_test_BST_return(
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 81e01fbb..07eec496 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -1127,10 +1127,10 @@ static int method_test_CCA(fwts_framework *fw)
{
if (fw->flags & FWTS_FLAG_TEST_SBBR)
return method_evaluate_method(fw, METHOD_MANDATORY,
- "_CCA", NULL, 0, fwts_method_test_integer_return, NULL);
+ "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA");
else
return method_evaluate_method(fw, METHOD_OPTIONAL,
- "_CCA", NULL, 0, fwts_method_test_integer_return, NULL);
+ "_CCA", NULL, 0, fwts_method_test_passed_failed_return, "_CCA");
}
/*
@@ -4157,7 +4157,7 @@ static int method_test_BMA(fwts_framework *fw)
arg[0].Integer.Value = 1;
return method_evaluate_method(fw, METHOD_MOBILE,
- "_BMA", arg, 1, fwts_method_test_integer_return, NULL);
+ "_BMA", arg, 1, fwts_method_test_passed_failed_return, "_BMA");
}
static int method_test_BMS(fwts_framework *fw)
@@ -4167,7 +4167,7 @@ static int method_test_BMS(fwts_framework *fw)
arg[0].Integer.Value = 1;
return method_evaluate_method(fw, METHOD_MOBILE,
- "_BMS", arg, 1, fwts_method_test_integer_return, NULL);
+ "_BMS", arg, 1, fwts_method_test_passed_failed_return, "_BMS");
}
static void method_test_BST_return(
--
2.25.1
More information about the fwts-devel
mailing list