mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks
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 all ecc->read_xxx() hooks at once. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Acked-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
00da2ea972
commit
b976168757
@@ -816,8 +816,8 @@ static int mxc_nand_read_page_v2_v3(struct nand_chip *chip, void *buf,
|
||||
return max_bitflips;
|
||||
}
|
||||
|
||||
static int mxc_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
uint8_t *buf, int oob_required, int page)
|
||||
static int mxc_nand_read_page(struct nand_chip *chip, uint8_t *buf,
|
||||
int oob_required, int page)
|
||||
{
|
||||
struct mxc_nand_host *host = nand_get_controller_data(chip);
|
||||
void *oob_buf;
|
||||
@@ -830,8 +830,8 @@ static int mxc_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
return host->devtype_data->read_page(chip, buf, oob_buf, 1, page);
|
||||
}
|
||||
|
||||
static int mxc_nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
uint8_t *buf, int oob_required, int page)
|
||||
static int mxc_nand_read_page_raw(struct nand_chip *chip, uint8_t *buf,
|
||||
int oob_required, int page)
|
||||
{
|
||||
struct mxc_nand_host *host = nand_get_controller_data(chip);
|
||||
void *oob_buf;
|
||||
@@ -844,8 +844,7 @@ static int mxc_nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
return host->devtype_data->read_page(chip, buf, oob_buf, 0, page);
|
||||
}
|
||||
|
||||
static int mxc_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
int page)
|
||||
static int mxc_nand_read_oob(struct nand_chip *chip, int page)
|
||||
{
|
||||
struct mxc_nand_host *host = nand_get_controller_data(chip);
|
||||
|
||||
|
Reference in New Issue
Block a user