Skip to content

Commit

Permalink
mtd: rawnand: mtk: Use nand_controller_init() instead of open-coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris Brezillon authored and Miquel Raynal committed Feb 5, 2019
1 parent 7b30196 commit b5c2def
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/nand/raw/mtk_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b5c2def

Please sign in to comment.