aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/ndfc.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-25 03:45:29 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-25 07:45:26 -0400
commit04bbd0eafb0c733c6c7f5d63c5098c615fe0685a (patch)
treee4bf0095d7a46912d13a1508ba9acd6e39fa3733 /drivers/mtd/nand/ndfc.c
parent8b9e9fe8c6ee354aa75dc5a33e1575b21aa52084 (diff)
[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 <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand/ndfc.c')
-rw-r--r--drivers/mtd/nand/ndfc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 481541a683ca..4d70dd16cf5d 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -293,8 +293,12 @@ static struct platform_driver ndfc_nand_driver = {
293 293
294static int __init ndfc_nand_init(void) 294static int __init ndfc_nand_init(void)
295{ 295{
296 int ret = platform_driver_register(&ndfc_nand_driver); 296 int ret;
297 297
298 spin_lock_init(&ndfc_ctrl.ndfc_control.lock);
299 init_waitqueue_head(&ndfc_ctrl.ndfc_control.wq);
300
301 ret = platform_driver_register(&ndfc_nand_driver);
298 if (!ret) 302 if (!ret)
299 ret = platform_driver_register(&ndfc_chip_driver); 303 ret = platform_driver_register(&ndfc_chip_driver);
300 return ret; 304 return ret;