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
@@ -1810,8 +1810,7 @@ static int alloc_nand_resource(struct platform_device *pdev)
|
||||
chip->cmdfunc = nand_cmdfunc;
|
||||
}
|
||||
|
||||
spin_lock_init(&chip->controller->lock);
|
||||
init_waitqueue_head(&chip->controller->wq);
|
||||
nand_hw_control_init(chip->controller);
|
||||
info->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(info->clk)) {
|
||||
dev_err(&pdev->dev, "failed to get nand clock\n");
|
||||
|
Reference in New Issue
Block a user