Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[pandora-kernel.git] / drivers / mtd / nand / sharpsl.c
index 45a1da7..fbeedc3 100644 (file)
@@ -115,8 +115,7 @@ static struct nand_bbt_descr sharpsl_akita_bbt = {
        .pattern = scan_ff_pattern
 };
 
-static struct nand_oobinfo akita_oobinfo = {
-       .useecc = MTD_NANDECC_AUTOPLACE,
+static struct nand_ecclayout akita_oobinfo = {
        .eccbytes = 24,
        .eccpos = {
                   0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11,
@@ -202,7 +201,7 @@ static int __init sharpsl_nand_init(void)
        this->badblock_pattern = &sharpsl_bbt;
        if (machine_is_akita() || machine_is_borzoi()) {
                this->badblock_pattern = &sharpsl_akita_bbt;
-               this->autooob = &akita_oobinfo;
+               this->ecc.layout = &akita_oobinfo;
        }
        this->ecc.hwctl = sharpsl_nand_enable_hwecc;
        this->ecc.calculate = sharpsl_nand_calculate_ecc;
@@ -238,11 +237,6 @@ static int __init sharpsl_nand_init(void)
                }
        }
 
-       if (machine_is_husky() || machine_is_borzoi() || machine_is_akita()) {
-               /* Need to use small eraseblock size for backward compatibility */
-               sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS;
-       }
-
        add_mtd_partitions(sharpsl_mtd, sharpsl_partition_info, nr_partitions);
 
        /* Return happy */
@@ -256,8 +250,6 @@ module_init(sharpsl_nand_init);
  */
 static void __exit sharpsl_nand_cleanup(void)
 {
-       struct nand_chip *this = (struct nand_chip *)&sharpsl_mtd[1];
-
        /* Release resources, unregister device */
        nand_release(sharpsl_mtd);