]> git.sur5r.net Git - u-boot/blobdiff - cmd/jffs2.c
serial: Make full device search optional
[u-boot] / cmd / jffs2.c
index add89dee6ab5dbe1ad006b86fdd7f232562b5f68..13c533cf12992bc2532f90b668806a614ed19e7d 100644 (file)
@@ -80,7 +80,7 @@
 #include <cramfs/cramfs_fs.h>
 
 #if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand.h>
+#include <linux/mtd/rawnand.h>
 #include <nand.h>
 #endif
 
@@ -479,9 +479,9 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        ulong offset = load_addr;
 
        /* pre-set Boot file name */
-       if ((filename = getenv("bootfile")) == NULL) {
+       filename = env_get("bootfile");
+       if (!filename)
                filename = "uImage";
-       }
 
        if (argc == 2) {
                filename = argv[1];