aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Brezillon2018-11-20 11:57:16 +0100
committerMiquel Raynal2019-02-05 15:39:39 +0100
commitb5c2defc026148c4d1e936e3bf26e49bd7e02dce (patch)
treed945a659dfad83a9d247837bd2b5fa18c232180d
parent7b30196534c90154bfbd85532b181e14bad18c31 (diff)
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 <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-rw-r--r--drivers/mtd/nand/raw/mtk_nand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index b6b4602f5132..2c0e09187773 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -1451,8 +1451,7 @@ static int mtk_nfc_probe(struct platform_device *pdev)
if (!nfc)
return -ENOMEM;
- spin_lock_init(&nfc->controller.lock);
- init_waitqueue_head(&nfc->controller.wq);
+ nand_controller_init(&nfc->controller);
INIT_LIST_HEAD(&nfc->chips);
nfc->controller.ops = &mtk_nfc_controller_ops;