mtd: rawnand: Pass a nand_chip object to chip->{get, set}_features()
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->{get,set}_features() hooks. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
a2098a9e4f
commit
aa36ff25ff
@@ -1299,10 +1299,10 @@ struct nand_chip {
|
||||
const struct nand_operation *op,
|
||||
bool check_only);
|
||||
int (*erase)(struct nand_chip *chip, int page);
|
||||
int (*set_features)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int feature_addr, uint8_t *subfeature_para);
|
||||
int (*get_features)(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int feature_addr, uint8_t *subfeature_para);
|
||||
int (*set_features)(struct nand_chip *chip, int feature_addr,
|
||||
uint8_t *subfeature_para);
|
||||
int (*get_features)(struct nand_chip *chip, int feature_addr,
|
||||
uint8_t *subfeature_para);
|
||||
int (*setup_read_retry)(struct mtd_info *mtd, int retry_mode);
|
||||
int (*setup_data_interface)(struct mtd_info *mtd, int chipnr,
|
||||
const struct nand_data_interface *conf);
|
||||
@@ -1681,8 +1681,8 @@ int nand_read_oob_syndrome(struct nand_chip *chip, int page);
|
||||
int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
|
||||
int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
|
||||
/* Stub used by drivers that do not support GET/SET FEATURES operations */
|
||||
int nand_get_set_features_notsupp(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int addr, u8 *subfeature_param);
|
||||
int nand_get_set_features_notsupp(struct nand_chip *chip, int addr,
|
||||
u8 *subfeature_param);
|
||||
|
||||
/* Default read_page_raw implementation */
|
||||
int nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, int oob_required,
|
||||
|
Reference in New Issue
Block a user