mtd: rawnand: Pass a nand_chip object to chip->cmdfunc()

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->cmdfunc() hook.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tento commit je obsažen v:
Boris Brezillon
2018-09-06 14:05:28 +02:00
odevzdal Miquel Raynal
rodič 50a487e771
revize 5295cf2e04
18 změnil soubory, kde provedl 64 přidání a 64 odebrání

Zobrazit soubor

@@ -236,14 +236,15 @@ static void au1550_select_chip(struct nand_chip *this, int chip)
/**
* au1550_command - Send command to NAND device
* @mtd: MTD device structure
* @this: NAND chip object
* @command: the command to be sent
* @column: the column address for this command, -1 if none
* @page_addr: the page address for this command, -1 if none
*/
static void au1550_command(struct mtd_info *mtd, unsigned command, int column, int page_addr)
static void au1550_command(struct nand_chip *this, unsigned command,
int column, int page_addr)
{
struct nand_chip *this = mtd_to_nand(mtd);
struct mtd_info *mtd = nand_to_mtd(this);
struct au1550nd_ctx *ctx = container_of(this, struct au1550nd_ctx,
chip);
int ce_override = 0, i;