mtd: cleanup unused code and variables in fis.c
[openwrt/openwrt.git] / package / system / mtd / src / fis.c
index e314c102580df46c2394a14d65cb85f269dbab5e..8bde9af6dc699b5fa616db44117280a6557d7506 100644 (file)
@@ -139,8 +139,6 @@ done:
 int
 fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
 {
-       struct fis_image_desc *fisdir = NULL;
-       struct fis_image_desc *redboot = NULL;
        struct fis_image_desc *first = NULL;
        struct fis_image_desc *last = NULL;
        struct fis_image_desc *first_fb = NULL;
@@ -164,12 +162,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
                if (!desc->hdr.name[0] || (desc->hdr.name[0] == 0xff))
                        break;
 
-               if (!strcmp((char *) desc->hdr.name, "FIS directory"))
-                       fisdir = desc;
-
-               if (!strcmp((char *) desc->hdr.name, "RedBoot"))
-                       redboot = desc;
-
                /* update max offset */
                if (offset < desc->hdr.flash_base)
                        offset = desc->hdr.flash_base;
@@ -210,18 +202,6 @@ fis_remap(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
 
        size = offset - first_fb->hdr.flash_base;
 
-#ifdef notyet
-       desc = first - 1;
-       if (redboot && (desc >= redboot)) {
-               if (first->hdr.flash_base - desc->hdr.size > desc->hdr.flash_base) {
-                       int delta = first->hdr.flash_base - desc->hdr.size - desc->hdr.flash_base;
-
-                       offset -= delta;
-                       size += delta;
-               }
-       }
-#endif
-
        last++;
        desc = first + n_new;
        offset = first_fb->hdr.flash_base;