These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / mtd / nand / atmel_nand.c
index 46010bd..583cdd9 100644 (file)
@@ -954,7 +954,8 @@ static int atmel_nand_pmecc_read_page(struct mtd_info *mtd,
 }
 
 static int atmel_nand_pmecc_write_page(struct mtd_info *mtd,
-               struct nand_chip *chip, const uint8_t *buf, int oob_required)
+               struct nand_chip *chip, const uint8_t *buf, int oob_required,
+               int page)
 {
        struct atmel_nand_host *host = chip->priv;
        uint32_t *eccpos = chip->ecc.layout->eccpos;
@@ -2005,7 +2006,8 @@ static int nfc_sram_write_page(struct mtd_info *mtd, struct nand_chip *chip,
 
        if (likely(!raw))
                /* Need to write ecc into oob */
-               status = chip->ecc.write_page(mtd, chip, buf, oob_required);
+               status = chip->ecc.write_page(mtd, chip, buf, oob_required,
+                                             page);
 
        if (status < 0)
                return status;
@@ -2126,7 +2128,7 @@ static int atmel_nand_probe(struct platform_device *pdev)
 
        nand_chip->priv = host;         /* link the private data structures */
        mtd->priv = nand_chip;
-       mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &pdev->dev;
 
        /* Set address of NAND IO lines */
        nand_chip->IO_ADDR_R = host->io_base;