Skip to content

Commit b5c2def

Browse files
Boris Brezillonmiquelraynal
authored andcommitted
mtd: rawnand: mtk: Use nand_controller_init() instead of open-coding it
nand_controller_init() has been added to simplify nand_controller struct initialization. Use this function instead of duplicating the logic. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 7b30196 commit b5c2def

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mtd/nand/raw/mtk_nand.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,7 @@ static int mtk_nfc_probe(struct platform_device *pdev)
14511451
if (!nfc)
14521452
return -ENOMEM;
14531453

1454-
spin_lock_init(&nfc->controller.lock);
1455-
init_waitqueue_head(&nfc->controller.wq);
1454+
nand_controller_init(&nfc->controller);
14561455
INIT_LIST_HEAD(&nfc->chips);
14571456
nfc->controller.ops = &mtk_nfc_controller_ops;
14581457

0 commit comments

Comments
 (0)