From: Boris Brezillon Date: Tue, 20 Nov 2018 10:57:16 +0000 (+0100) Subject: mtd: rawnand: mtk: Use nand_controller_init() instead of open-coding it X-Git-Tag: microblaze-v5.4-rc1~1282^2^2~23 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=b5c2defc026148c4d1e936e3bf26e49bd7e02dce;p=linux-2.6-microblaze.git 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 Signed-off-by: Miquel Raynal --- 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;