]> git.sur5r.net Git - u-boot/blobdiff - lib/smbios.c
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / lib / smbios.c
index 22ca247fec8881ba3dcc87ffc831769f85cf1a4a..df3d26b07107088d7bee64897d5c677b4f3592ed 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  *
  * Adapted from coreboot src/arch/x86/smbios.c
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -16,8 +15,6 @@
 #include <dm/uclass-internal.h>
 #endif
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * smbios_add_string() - add a string to the string area
  *
@@ -112,7 +109,7 @@ static int smbios_write_type1(ulong *current, int handle)
 {
        struct smbios_type1 *t = (struct smbios_type1 *)*current;
        int len = sizeof(struct smbios_type1);
-       char *serial_str = getenv("serial#");
+       char *serial_str = env_get("serial#");
 
        memset(t, 0, sizeof(struct smbios_type1));
        fill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, handle);