]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_mtdparts.c
mmc: Change board_mmc_getcd() function prototype.
[karo-tx-uboot.git] / common / cmd_mtdparts.c
index 5481c885d3ea1bb92303d5396d5f626d7c5337e2..b7c833b14992d365050b724060fb81c55f743e00 100644 (file)
@@ -838,7 +838,8 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
        struct mtdids *id;
        const char *mtd_id;
        unsigned int mtd_id_len;
-       const char *p, *pend;
+       const char *p;
+       const char *pend;
        LIST_HEAD(tmp_list);
        struct list_head *entry, *n;
        u16 num_parts;
@@ -868,10 +869,12 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
                return 1;
        }
 
+#ifdef DEBUG
+       pend = strchr(p, ';');
+#endif
        debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
                        id->type, MTD_DEV_TYPE(id->type),
                        id->num, id->mtd_id);
-       pend = strchr(p, ';');
        debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);