summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/denali.c
diff options
context:
space:
mode:
authorBoris Brezillon2018-09-07 00:38:39 +0200
committerMiquel Raynal2018-10-03 11:12:25 +0200
commitf9ebd1bb41031afc162e9acda7ad044a35bccf82 (patch)
tree2c37979d6b398a182a6cb4e794e1b3429dbd4d89 /drivers/mtd/nand/raw/denali.c
parentmtd: rawnand: Deprecate ->block_{bad,markbad}() hooks (diff)
downloadkernel-qcow2-linux-f9ebd1bb41031afc162e9acda7ad044a35bccf82.tar.gz
kernel-qcow2-linux-f9ebd1bb41031afc162e9acda7ad044a35bccf82.tar.xz
kernel-qcow2-linux-f9ebd1bb41031afc162e9acda7ad044a35bccf82.zip
mtd: rawnand: Deprecate ->erase()
The ->erase() hook have been overloaded by some drivers for bad reasons: either the driver was not fitting in the NAND framework and should have been an MTD driver (docg4), or the driver uses a specific path for the ERASE operation (denali), instead of implementing it generically. In any case, we should discourage people from overloading this method and encourage them to implement ->exec_op() instead. Move the ->erase() hook to the nand_legacy struct to make it clear. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/denali.c')
-rw-r--r--drivers/mtd/nand/raw/denali.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index c14493ef6126..858358027dc9 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -1275,7 +1275,7 @@ static int denali_attach_chip(struct nand_chip *chip)
chip->ecc.write_page_raw = denali_write_page_raw;
chip->ecc.read_oob = denali_read_oob;
chip->ecc.write_oob = denali_write_oob;
- chip->erase = denali_erase;
+ chip->legacy.erase = denali_erase;
ret = denali_multidev_fixup(denali);
if (ret)