From 04bbd0eafb0c733c6c7f5d63c5098c615fe0685a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 25 May 2006 09:45:29 +0200 Subject: [MTD] NAND Initialize controller lock and wq only once The lock simplifying patch did not move the lock and waitqueue initialization into the controller allocation patch. This reinitializes waitqueue and spinlocks also for driver supplied controller stuctures. Move it into the allocation path. Signed-off-by: Thomas Gleixner --- drivers/mtd/nand/ndfc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/mtd/nand/ndfc.c') diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 481541a..4d70dd1 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -293,8 +293,12 @@ static struct platform_driver ndfc_nand_driver = { static int __init ndfc_nand_init(void) { - int ret = platform_driver_register(&ndfc_nand_driver); + int ret; + spin_lock_init(&ndfc_ctrl.ndfc_control.lock); + init_waitqueue_head(&ndfc_ctrl.ndfc_control.wq); + + ret = platform_driver_register(&ndfc_nand_driver); if (!ret) ret = platform_driver_register(&ndfc_chip_driver); return ret; -- cgit v1.1