diff options
author | Marc Gonzalez <marc_gonzalez@sigmadesigns.com> | 2016-07-27 11:23:52 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-09-23 09:35:16 +0200 |
commit | d45bc58dd3bdcaabc1d7d8d9b0b8dee826635cc6 (patch) | |
tree | a2ba9413cf9dcaeff353b9a065e5db3fab2651ae /drivers/mtd/nand/docg4.c | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
download | op-kernel-dev-d45bc58dd3bdcaabc1d7d8d9b0b8dee826635cc6.zip op-kernel-dev-d45bc58dd3bdcaabc1d7d8d9b0b8dee826635cc6.tar.gz |
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>
Diffstat (limited to 'drivers/mtd/nand/docg4.c')
-rw-r--r-- | drivers/mtd/nand/docg4.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index 4731699..7af2a3c 100644 --- a/drivers/mtd/nand/docg4.c +++ b/drivers/mtd/nand/docg4.c @@ -1249,8 +1249,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd) nand->options = NAND_BUSWIDTH_16 | NAND_NO_SUBPAGE_WRITE; nand->IO_ADDR_R = nand->IO_ADDR_W = doc->virtadr + DOC_IOSPACE_DATA; nand->controller = &nand->hwcontrol; - spin_lock_init(&nand->controller->lock); - init_waitqueue_head(&nand->controller->wq); + nand_hw_control_init(nand->controller); /* methods */ nand->cmdfunc = docg4_command; |