mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
7b30196534
commit
b5c2defc02
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue