mtd: nand: Remove unused chip->write_page() hook
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 16 Mar 2017 08:02:42 +0000 (09:02 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:30 +0000 (14:18 +0200)
The last/only user of the chip->write_page() hook (the Atmel NAND
controller driver) has been reworked and is no longer specifying a custom
->write_page() implementation.
Drop this hook before someone else start abusing it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/nand.h

index c4c3386e4c0ad14ccdd6416e6deda466ff2af598..36258e69a3897b085fb94029df6cabde3f9d4354 100644 (file)
@@ -2633,7 +2633,7 @@ static int nand_write_page_syndrome(struct mtd_info *mtd,
 }
 
 /**
- * nand_write_page - [REPLACEABLE] write one page
+ * nand_write_page - write one page
  * @mtd: MTD device structure
  * @chip: NAND chip descriptor
  * @offset: address offset within the page
@@ -2836,9 +2836,10 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                        /* We still need to erase leftover OOB data */
                        memset(chip->oob_poi, 0xff, mtd->oobsize);
                }
-               ret = chip->write_page(mtd, chip, column, bytes, wbuf,
-                                       oob_required, page, cached,
-                                       (ops->mode == MTD_OPS_RAW));
+
+               ret = nand_write_page(mtd, chip, column, bytes, wbuf,
+                                     oob_required, page, cached,
+                                     (ops->mode == MTD_OPS_RAW));
                if (ret)
                        break;
 
@@ -4548,9 +4549,6 @@ int nand_scan_tail(struct mtd_info *mtd)
                }
        }
 
-       if (!chip->write_page)
-               chip->write_page = nand_write_page;
-
        /*
         * Check ECC mode, default to software if 3byte/512byte hardware ECC is
         * selected and we have 256 byte pagesize fallback to software ECC
index c7de017c7f4c631cb404a3a6544bff0a159a17e8..40657939797c4170f19e64ac98eb06ee04830f7a 100644 (file)
@@ -828,7 +828,6 @@ struct nand_manufacturer_ops {
  * @errstat:           [OPTIONAL] hardware specific function to perform
  *                     additional error status checks (determine if errors are
  *                     correctable).
- * @write_page:                [REPLACEABLE] High-level page write function
  * @manufacturer:      [INTERN] Contains manufacturer information
  */
 
@@ -854,9 +853,6 @@ struct nand_chip {
        int (*scan_bbt)(struct mtd_info *mtd);
        int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state,
                        int status, int page);
-       int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
-                       uint32_t offset, int data_len, const uint8_t *buf,
-                       int oob_required, int page, int cached, int raw);
        int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip,
                        int feature_addr, uint8_t *subfeature_para);
        int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,