
From: <tglx@linutronix.de>

To make spinlock/rwlock initialization consistent all over the kernel,
this patch converts explicit lock-initializers into spin_lock_init() and
rwlock_init() calls.

Currently, spinlocks and rwlocks are initialized in two different ways:

  lock = SPIN_LOCK_UNLOCKED
  spin_lock_init(&lock)
  
  rwlock = RW_LOCK_UNLOCKED
  rwlock_init(&rwlock)

this patch converts all explicit lock initializations to
spin_lock_init() or rwlock_init(). (Besides consistency this also helps
automatic lock validators and debugging code.)

The conversion was done with a script, it was verified manually and it
was reviewed, compiled and tested as far as possible on x86, ARM, PPC.

There is no runtime overhead or actual code change resulting out of this
patch, because spin_lock_init() and rwlock_init() are macros and are
thus equivalent to the explicit initialization method.

That's the second batch of the unifying patches.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/block/DAC960.c     |    2 +-
 25-akpm/drivers/block/cciss_scsi.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/block/cciss_scsi.c~lock-initializer-unifying-batch-2-block-devices drivers/block/cciss_scsi.c
--- 25/drivers/block/cciss_scsi.c~lock-initializer-unifying-batch-2-block-devices	Thu Oct 28 15:52:50 2004
+++ 25-akpm/drivers/block/cciss_scsi.c	Thu Oct 28 15:52:50 2004
@@ -534,7 +534,7 @@ cciss_scsi_setup(int cntl_num)
 	if (shba == NULL)
 		return;
 	shba->scsi_host = NULL;
-	shba->lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&shba->lock);
 	shba->registered = 0;
 	if (scsi_cmd_stack_setup(cntl_num, shba) != 0) {
 		kfree(shba);
diff -puN drivers/block/DAC960.c~lock-initializer-unifying-batch-2-block-devices drivers/block/DAC960.c
--- 25/drivers/block/DAC960.c~lock-initializer-unifying-batch-2-block-devices	Thu Oct 28 15:52:50 2004
+++ 25-akpm/drivers/block/DAC960.c	Thu Oct 28 15:52:50 2004
@@ -2738,7 +2738,7 @@ DAC960_DetectController(struct pci_dev *
   }
   init_waitqueue_head(&Controller->CommandWaitQueue);
   init_waitqueue_head(&Controller->HealthStatusWaitQueue);
-  Controller->queue_lock = SPIN_LOCK_UNLOCKED; 
+  spin_lock_init(&Controller->queue_lock);
   DAC960_AnnounceDriver(Controller);
   /*
     Map the Controller Register Window.
_
