]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/serial/usbtty.c
env: Rename getenv/_f() to env_get()
[people/ms/u-boot.git] / drivers / serial / usbtty.c
index 29799dce93a00fa1a547118fc16d493ad4323da7..353109c0700af1e66641bca0451685a7c66cc0a4 100644 (file)
@@ -526,9 +526,9 @@ int drv_usbtty_init (void)
        int snlen;
 
        /* Ger seiral number */
-       if (!(sn = getenv("serial#"))) {
+       sn = env_get("serial#");
+       if (!sn)
                sn = "000000000000";
-       }
        snlen = strlen(sn);
        if (snlen > sizeof(serial_number) - 1) {
                printf ("Warning: serial number %s is too long (%d > %lu)\n",
@@ -540,10 +540,9 @@ int drv_usbtty_init (void)
 
        /* Decide on which type of UDC device to be.
         */
-
-       if(!(tt = getenv("usbtty"))) {
+       tt = env_get("usbtty");
+       if (!tt)
                tt = "generic";
-       }
        usbtty_init_terminal_type(strcmp(tt,"cdc_acm"));
 
        /* prepare buffers... */