]> git.sur5r.net Git - u-boot/blobdiff - drivers/bootcount/bootcount_env.c
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / drivers / bootcount / bootcount_env.c
index ec5f9426760242401c9d23f11556d49aeb69fb28..9084ca8a6e82665c1b944f95a19012a7aeeb0163 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013
  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -10,7 +9,7 @@
 
 void bootcount_store(ulong a)
 {
-       int upgrade_available = getenv_ulong("upgrade_available", 10, 0);
+       int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
 
        if (upgrade_available) {
                env_set_ulong("bootcount", a);
@@ -20,11 +19,11 @@ void bootcount_store(ulong a)
 
 ulong bootcount_load(void)
 {
-       int upgrade_available = getenv_ulong("upgrade_available", 10, 0);
+       int upgrade_available = env_get_ulong("upgrade_available", 10, 0);
        ulong val = 0;
 
        if (upgrade_available)
-               val = getenv_ulong("bootcount", 10, 0);
+               val = env_get_ulong("bootcount", 10, 0);
 
        return val;
 }