diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2018-06-09 16:27:44 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2018-06-09 23:06:30 +0300 |
commit | a67c703af742ce5ff1418221b85bd610cf41f28c (patch) | |
tree | 622d2363cf7ab148dc1280f11a5c8a1e0dd38078 | |
parent | 0a53ddc7f2683b2e2c7725f8d459814b3a01613b (diff) | |
download | android_hardware_qcom_power-a67c703af742ce5ff1418221b85bd610cf41f28c.tar.gz android_hardware_qcom_power-a67c703af742ce5ff1418221b85bd610cf41f28c.tar.bz2 android_hardware_qcom_power-a67c703af742ce5ff1418221b85bd610cf41f28c.zip |
power: Remove unused list utils
* They were added in 6ec1206b246a164acfb0aa7b43af9b04c759063e
but never used
Change-Id: I0f0d0336cd91715eb8aa4dcb42ae1e449da8603b
-rw-r--r-- | list.c | 31 | ||||
-rw-r--r-- | list.h | 2 |
2 files changed, 0 insertions, 33 deletions
@@ -34,16 +34,6 @@ #include "list.h" #include <log/log.h> -int init_list_head(struct list_node *head) -{ - if (head == NULL) - return -1; - - memset(head, 0, sizeof(*head)); - - return 0; -} - struct list_node *add_list_node(struct list_node *head, void *data) { /* Create a new list_node. And put 'data' into it. */ @@ -66,11 +56,6 @@ struct list_node *add_list_node(struct list_node *head, void *data) return new_node; } -int is_list_empty(struct list_node *head) -{ - return (head == NULL || head->next == NULL); -} - /* * Delink and de-allocate 'node'. */ @@ -107,22 +92,6 @@ int remove_list_node(struct list_node *head, struct list_node *del_node) return 0; } -void dump_list(struct list_node *head) -{ - struct list_node *current_node = head; - - if (head == NULL) - return; - - ALOGV("List:\n"); - - while ((current_node = current_node->next)) { - if (current_node->dump) { - current_node->dump(current_node->data); - } - } -} - struct list_node *find_node(struct list_node *head, void *comparison_data) { struct list_node *current_node = head; @@ -34,8 +34,6 @@ struct list_node { void (*dump)(void *data); }; -int init_list_head(struct list_node *head); struct list_node * add_list_node(struct list_node *head, void *data); int remove_list_node(struct list_node *head, struct list_node *del_node); -void dump_list(struct list_node *head); struct list_node *find_node(struct list_node *head, void *comparison_data); |