summaryrefslogtreecommitdiff
path: root/common/fpsensor
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2020-08-14 13:17:28 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-15 00:31:30 +0000
commit16f541417ac84949c9b9e02152422e4131672e38 (patch)
tree4345adf9742b88fcbd8bf98aa5e613a99a5f205e /common/fpsensor
parent86c55038ec6a43db5ae677defd575da7651b8602 (diff)
downloadchrome-ec-16f541417ac84949c9b9e02152422e4131672e38.tar.gz
fingerprint: Stopgap to repair public builds
This repairs building bloonchipper and dartmonkey builds when private lib is unavailable. There are two issues this remedies: 1) Redefinition of sensor info macros, like FP_SENSOR_RES_X 2) Undefined reference to fp_sensor_maintenance when building bloonchipper/dartmonkey non-private image. All of these issues stem from the way we handle code when HAVE_FP_PRIVATE_DRIVER is set or faked by a test. This is a fundamental issues that needs some thought and refactoring. BRANCH=none BUG=b:164174822,b:163109916, b:163411883 TEST=# With private time make buildall -j TEST=# Without private time make buildall -j TEST=# With private libs # Cherry-pick https://crrev.com/c/2357870 first, then # this patch. ./util/compare_build.sh -b all -o # This confirms that the all output binaries with private-lib # did not change at all Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: If71e3376fb7a904b77f2fc9fc56c8e0daf54db3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2357430 Reviewed-by: Andrew de los Reyes <adlr@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org>
Diffstat (limited to 'common/fpsensor')
-rw-r--r--common/fpsensor/fpsensor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/fpsensor/fpsensor.c b/common/fpsensor/fpsensor.c
index 035dc7da5a..01a6157cda 100644
--- a/common/fpsensor/fpsensor.c
+++ b/common/fpsensor/fpsensor.c
@@ -830,10 +830,13 @@ int command_fpclear(int argc, char **argv)
DECLARE_CONSOLE_COMMAND(fpclear, command_fpclear, NULL,
"Clear fingerprint sensor context");
-
int command_fpmaintenance(int argc, char **argv)
{
+#ifdef HAVE_FP_PRIVATE_DRIVER
return fp_maintenance();
+#else
+ return EC_SUCCESS;
+#endif /* #ifdef HAVE_FP_PRIVATE_DRIVER */
}
DECLARE_CONSOLE_COMMAND(fpmaintenance, command_fpmaintenance, NULL,
"Run fingerprint sensor maintenance");