mtd: nand: import nand_hw_control_init()
The code to initialize a struct nand_hw_control is duplicated across several drivers. Factorize it using an inline function. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:

committed by
Boris Brezillon

parent
29b4817d40
commit
d45bc58dd3
@@ -368,9 +368,8 @@ static int jz4780_nand_probe(struct platform_device *pdev)
|
||||
nfc->dev = dev;
|
||||
nfc->num_banks = num_banks;
|
||||
|
||||
spin_lock_init(&nfc->controller.lock);
|
||||
nand_hw_control_init(&nfc->controller);
|
||||
INIT_LIST_HEAD(&nfc->chips);
|
||||
init_waitqueue_head(&nfc->controller.wq);
|
||||
|
||||
ret = jz4780_nand_init_chips(nfc, pdev);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user