[PATCH] mtd: nand: pxa3xx: Implement failing ->onfi_{set,get}_features() stubs
From: Boris Brezillon
Date: Thu May 25 2017 - 02:15:15 EST
Implement stubs returning -ENOTSUPP for ->onfi_{set,get}_features() so
that we don't let the core think we are supporting the GET/SET FEATURES
operation.
Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxxxxxxx>
---
drivers/mtd/nand/pxa3xx_nand.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 649ba8200832..341a229046f5 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1649,6 +1649,13 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info,
return 0;
}
+static int pxa3xx_nand_get_set_features(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ int feature_addr, u8 *subfeature_para)
+{
+ return -ENOTSUPP;
+}
+
static int pxa3xx_nand_scan(struct mtd_info *mtd)
{
struct nand_chip *chip = mtd_to_nand(mtd);
@@ -1812,6 +1819,8 @@ static int alloc_nand_resource(struct platform_device *pdev)
chip->write_buf = pxa3xx_nand_write_buf;
chip->options |= NAND_NO_SUBPAGE_WRITE;
chip->cmdfunc = nand_cmdfunc;
+ chip->onfi_set_features = pxa3xx_nand_get_set_features;
+ chip->onfi_get_features = pxa3xx_nand_get_set_features;
}
nand_hw_control_init(chip->controller);
--
2.11.0