Skip to content

Commit f107d7a

Browse files
author
Boris Brezillon
committed
mtd: nand: Remove unused chip->write_page() hook
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>
1 parent 82d0bf3 commit f107d7a

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

‎drivers/mtd/nand/nand_base.c‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,7 @@ static int nand_write_page_syndrome(struct mtd_info *mtd,
26332633
}
26342634

26352635
/**
2636-
* nand_write_page - [REPLACEABLE] write one page
2636+
* nand_write_page - write one page
26372637
* @mtd: MTD device structure
26382638
* @chip: NAND chip descriptor
26392639
* @offset: address offset within the page
@@ -2836,9 +2836,10 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
28362836
/* We still need to erase leftover OOB data */
28372837
memset(chip->oob_poi, 0xff, mtd->oobsize);
28382838
}
2839-
ret = chip->write_page(mtd, chip, column, bytes, wbuf,
2840-
oob_required, page, cached,
2841-
(ops->mode == MTD_OPS_RAW));
2839+
2840+
ret = nand_write_page(mtd, chip, column, bytes, wbuf,
2841+
oob_required, page, cached,
2842+
(ops->mode == MTD_OPS_RAW));
28422843
if (ret)
28432844
break;
28442845

@@ -4548,9 +4549,6 @@ int nand_scan_tail(struct mtd_info *mtd)
45484549
}
45494550
}
45504551

4551-
if (!chip->write_page)
4552-
chip->write_page = nand_write_page;
4553-
45544552
/*
45554553
* Check ECC mode, default to software if 3byte/512byte hardware ECC is
45564554
* selected and we have 256 byte pagesize fallback to software ECC

‎include/linux/mtd/nand.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,6 @@ struct nand_manufacturer_ops {
828828
* @errstat: [OPTIONAL] hardware specific function to perform
829829
* additional error status checks (determine if errors are
830830
* correctable).
831-
* @write_page: [REPLACEABLE] High-level page write function
832831
* @manufacturer: [INTERN] Contains manufacturer information
833832
*/
834833

@@ -854,9 +853,6 @@ struct nand_chip {
854853
int (*scan_bbt)(struct mtd_info *mtd);
855854
int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state,
856855
int status, int page);
857-
int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
858-
uint32_t offset, int data_len, const uint8_t *buf,
859-
int oob_required, int page, int cached, int raw);
860856
int (*onfi_set_features)(struct mtd_info *mtd, struct nand_chip *chip,
861857
int feature_addr, uint8_t *subfeature_para);
862858
int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip,

0 commit comments

Comments
 (0)