Skip to content

Commit abc846a

Browse files
bbrezillonmiquelraynal
authored andcommitted
mtd: rawnand: fsl_upm: Inherit from nand_controller
Explicitly inherit from nand_controller instead of relying on the nand_chip.legacy.dummy_controller field. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent a50895b commit abc846a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mtd/nand/raw/fsl_upm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define FSL_UPM_WAIT_WRITE_BUFFER 0x4
2525

2626
struct fsl_upm_nand {
27+
struct nand_controller base;
2728
struct device *dev;
2829
struct nand_chip chip;
2930
int last_ctrl;
@@ -167,6 +168,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun,
167168
if (!fun->rnb_gpio[0])
168169
fun->chip.legacy.dev_ready = fun_chip_ready;
169170

171+
fun->chip.controller = &fun->base;
170172
mtd->dev.parent = fun->dev;
171173

172174
flash_np = of_get_next_child(upm_np, NULL);
@@ -268,6 +270,7 @@ static int fun_probe(struct platform_device *ofdev)
268270
fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN |
269271
FSL_UPM_WAIT_WRITE_BYTE;
270272

273+
nand_controller_init(&fun->base);
271274
fun->dev = &ofdev->dev;
272275
fun->last_ctrl = NAND_CLE;
273276

0 commit comments

Comments
 (0)