diff options
author | Sasha Levitskiy <sanek@google.com> | 2015-06-08 13:14:15 -0700 |
---|---|---|
committer | Sasha Levitskiy <sanek@google.com> | 2015-06-10 14:10:47 -0700 |
commit | d4331fdae5247bdbac27f1db94cac504ea5afb78 (patch) | |
tree | ccd2cdf134c3980f732e52afb26d23a9289878b7 | |
parent | 17b8cee9a2df698448381d1b03cec2b618c27e97 (diff) | |
download | hardware_libhardware-d4331fdae5247bdbac27f1db94cac504ea5afb78.zip hardware_libhardware-d4331fdae5247bdbac27f1db94cac504ea5afb78.tar.gz hardware_libhardware-d4331fdae5247bdbac27f1db94cac504ea5afb78.tar.bz2 |
Fingerprint: Avoid passing structures where simple types should suffice.
Bug: 21282699
Change-Id: I02e13b7da0ad361a95b981f9745aac039151f356
Signed-off-by: Sasha Levitskiy <sanek@google.com>
-rw-r--r-- | include/hardware/fingerprint.h | 12 | ||||
-rw-r--r-- | modules/fingerprint/fingerprint.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h index 1fb803a..fd0d8f3 100644 --- a/include/hardware/fingerprint.h +++ b/include/hardware/fingerprint.h @@ -89,7 +89,7 @@ typedef struct fingerprint_msg { } fingerprint_msg_t; /* Callback function type */ -typedef void (*fingerprint_notify_t)(fingerprint_msg_t msg); +typedef void (*fingerprint_notify_t)(const fingerprint_msg_t *msg); /* Synchronous operation */ typedef struct fingerprint_device { @@ -174,16 +174,16 @@ typedef struct fingerprint_device { /* * Fingerprint remove request: - * deletes a fingerprint template or a previously selected group. - * If the fingerprint id is 0 then the entire group is removed. - * notify() will be called for each template deleted with + * Deletes a fingerprint template. + * Works only within a path set by set_active_group(). + * notify() will be called with details on the template deleted. * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED and - * fingerprint_msg.data.removed.id indicating each template id removed. + * fingerprint_msg.data.removed.id indicating the template id removed. * * Function return: 0 if fingerprint template(s) can be successfully deleted * -1 otherwise. */ - int (*remove)(struct fingerprint_device *dev, fingerprint_finger_id_t finger); + int (*remove)(struct fingerprint_device *dev, uint32_t gid, uint32_t fid); /* * Restricts the HAL operation to a set of fingerprints belonging to a diff --git a/modules/fingerprint/fingerprint.c b/modules/fingerprint/fingerprint.c index e81b182..08b112b 100644 --- a/modules/fingerprint/fingerprint.c +++ b/modules/fingerprint/fingerprint.c @@ -53,7 +53,7 @@ static int fingerprint_cancel(struct fingerprint_device __unused *dev) { } static int fingerprint_remove(struct fingerprint_device __unused *dev, - fingerprint_finger_id_t __unused fingerprint_id) { + uint32_t __unused gid, uint32_t __unused fid) { return FINGERPRINT_ERROR; } |