mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
29b4817d40
commit
d45bc58dd3
14 changed files with 20 additions and 26 deletions
|
@ -460,6 +460,13 @@ struct nand_hw_control {
|
|||
wait_queue_head_t wq;
|
||||
};
|
||||
|
||||
static inline void nand_hw_control_init(struct nand_hw_control *nfc)
|
||||
{
|
||||
nfc->active = NULL;
|
||||
spin_lock_init(&nfc->lock);
|
||||
init_waitqueue_head(&nfc->wq);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct nand_ecc_ctrl - Control structure for ECC
|
||||
* @mode: ECC mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue