diff options
Diffstat (limited to 'drivers/mtd/nand/nand_s3c24xx.c')
-rw-r--r-- | drivers/mtd/nand/nand_s3c24xx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_s3c24xx.c b/drivers/mtd/nand/nand_s3c24xx.c index e20517ab4a..59bd6c9fed 100644 --- a/drivers/mtd/nand/nand_s3c24xx.c +++ b/drivers/mtd/nand/nand_s3c24xx.c @@ -26,6 +26,7 @@ #include <malloc.h> #include <init.h> #include <linux/mtd/mtd.h> +#include <linux/mtd/rawnand.h> #include <linux/mtd/nand.h> #include <mach/s3c-generic.h> #include <mach/s3c-iomap.h> @@ -420,7 +421,7 @@ static int s3c24x0_nand_probe(struct device_d *dev) /* structures must be linked */ chip = &host->nand; - mtd = &chip->mtd; + mtd = nand_to_mtd(chip); mtd->dev.parent = dev; /* init the default settings */ @@ -462,7 +463,7 @@ static int s3c24x0_nand_probe(struct device_d *dev) { /* small page (512 bytes per page) */ chip->ecc.size = 512; - chip->ecc.layout = &nand_hw_eccoob; + mtd_set_ecclayout(mtd, &nand_hw_eccoob); } if (pdata->flash_bbt) { @@ -481,7 +482,7 @@ static int s3c24x0_nand_probe(struct device_d *dev) goto on_error; } - return add_mtd_nand_device(chip, "nand"); + return add_mtd_nand_device(mtd, "nand"); on_error: free(host); |