fix the damn kernel config
[openwrt.git] / target / linux / generic-2.6 / patches / 060-rootfs_split.patch
index e2e52f6..7e4161e 100644 (file)
@@ -1,6 +1,6 @@
-diff -ur linux.old/drivers/mtd/Kconfig linux.dev/drivers/mtd/Kconfig
---- linux.old/drivers/mtd/Kconfig      2007-01-10 20:10:37.000000000 +0100
-+++ linux.dev/drivers/mtd/Kconfig      2007-02-19 23:00:53.739457000 +0100
+diff -urN linux-2.6.21.1.old/drivers/mtd/Kconfig linux-2.6.21.1.dev/drivers/mtd/Kconfig
+--- linux-2.6.21.1.old/drivers/mtd/Kconfig     2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1.dev/drivers/mtd/Kconfig     2007-05-26 19:58:42.320520952 +0200
 @@ -49,6 +49,11 @@
          devices. Partitioning on NFTL 'devices' is a different - that's the
          'normal' form of partitioning used on a block device.
@@ -13,9 +13,9 @@ diff -ur linux.old/drivers/mtd/Kconfig linux.dev/drivers/mtd/Kconfig
  config MTD_REDBOOT_PARTS
        tristate "RedBoot partition table parsing"
        depends on MTD_PARTITIONS
-diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
---- linux.old/drivers/mtd/mtdpart.c    2007-01-10 20:10:37.000000000 +0100
-+++ linux.dev/drivers/mtd/mtdpart.c    2007-02-20 00:01:38.587355896 +0100
+diff -urN linux-2.6.21.1.old/drivers/mtd/mtdpart.c linux-2.6.21.1.dev/drivers/mtd/mtdpart.c
+--- linux-2.6.21.1.old/drivers/mtd/mtdpart.c   2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1.dev/drivers/mtd/mtdpart.c   2007-05-26 19:58:42.331519280 +0200
 @@ -20,6 +20,8 @@
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
@@ -25,7 +25,7 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
  
  /* Our partition linked list */
  static LIST_HEAD(mtd_partitions);
-@@ -303,6 +305,173 @@
+@@ -308,6 +310,172 @@
        return 0;
  }
  
@@ -35,14 +35,13 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
 +      struct mtd_part *slave;
 +      
 +      /* allocate the partition structure */
-+      slave = kmalloc (sizeof(*slave), GFP_KERNEL);
++      slave = kzalloc (sizeof(*slave), GFP_KERNEL);
 +      if (!slave) {
 +              printk ("memory allocation error while creating partitions for \"%s\"\n",
 +                      master->name);
 +              del_mtd_partitions(master);
 +              return -ENOMEM;
 +      }
-+      memset(slave, 0, sizeof(*slave));
 +      list_add(&slave->list, &mtd_partitions);
 +
 +      /* set up the MTD object for this partition */
@@ -51,8 +50,8 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
 +      slave->mtd.size = part->size;
 +      slave->mtd.writesize = master->writesize;
 +      slave->mtd.oobsize = master->oobsize;
-+      slave->mtd.ecctype = master->ecctype;
-+      slave->mtd.eccsize = master->eccsize;
++      slave->mtd.oobavail = master->oobavail;
++      slave->mtd.subpage_sft = master->subpage_sft;
 +
 +      slave->mtd.name = part->name;
 +      slave->mtd.bank_size = master->bank_size;
@@ -199,7 +198,7 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
  /*
   * This function, given a master MTD object and a partition table, creates
   * and registers slave MTD objects which are bound to the master according to
-@@ -314,171 +483,53 @@
+@@ -319,170 +487,53 @@
                       const struct mtd_partition *parts,
                       int nbparts)
  {
@@ -242,7 +241,7 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
 +                              part->offset += len;
 +                              part->size -= len;
 +                      
-+                              if (len + master->erasesize < part->size)
++                              if (master->erasesize <= part->size)
 +                                      ret = add_mtd_partition(master, part, i + 1);
 +                              else
 +                                      kfree(part->name);
@@ -250,14 +249,13 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
 +                                      return ret;
  
 -              /* allocate the partition structure */
--              slave = kmalloc (sizeof(*slave), GFP_KERNEL);
+-              slave = kzalloc (sizeof(*slave), GFP_KERNEL);
 -              if (!slave) {
 -                      printk ("memory allocation error while creating partitions for \"%s\"\n",
 -                              master->name);
 -                      del_mtd_partitions(master);
 -                      return -ENOMEM;
 -              }
--              memset(slave, 0, sizeof(*slave));
 -              list_add(&slave->list, &mtd_partitions);
 -
 -              /* set up the MTD object for this partition */
@@ -266,8 +264,8 @@ diff -ur linux.old/drivers/mtd/mtdpart.c linux.dev/drivers/mtd/mtdpart.c
 -              slave->mtd.size = parts[i].size;
 -              slave->mtd.writesize = master->writesize;
 -              slave->mtd.oobsize = master->oobsize;
--              slave->mtd.ecctype = master->ecctype;
--              slave->mtd.eccsize = master->eccsize;
+-              slave->mtd.oobavail = master->oobavail;
+-              slave->mtd.subpage_sft = master->subpage_sft;
 -
 -              slave->mtd.name = parts[i].name;
 -              slave->mtd.bank_size = master->bank_size;
This page took 0.026978 seconds and 4 git commands to generate.