You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2018/11/07 21:15:11 UTC

[mynewt-core] 01/05: hw/battery: remove `battery_mgr_register()`

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit f73318415a048ea464f42dd6e1f3af07745ba8ab
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Thu Nov 1 14:34:59 2018 -0700

    hw/battery: remove `battery_mgr_register()`
    
    This function was not called anywhere and it had no prototype.
---
 hw/battery/src/battery.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/hw/battery/src/battery.c b/hw/battery/src/battery.c
index dd9efd2..4e09570 100644
--- a/hw/battery/src/battery.c
+++ b/hw/battery/src/battery.c
@@ -151,23 +151,6 @@ battery_pkg_init(void)
 }
 
 int
-battery_mgr_register(struct battery *battery)
-{
-    int i;
-
-    os_mutex_pend(&battery_manager.bm_lock, OS_WAIT_FOREVER);
-
-    for (i = 0; i < BATTERY_MAX_COUNT; ++i) {
-        if (battery_manager.bm_batteries[i] == NULL) {
-            battery_manager.bm_batteries[i] = battery;
-        }
-    }
-    os_mutex_release(&battery_manager.bm_lock);
-
-    return 0;
-}
-
-int
 battery_mgr_get_battery_count(void)
 {
     int i;