]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup - (ALPHA)
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:24:28 +0000 (16:24 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:24:28 +0000 (16:24 -0800)
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/alpha/kernel/irq_i8259.c
arch/alpha/kernel/irq_srm.c
arch/alpha/kernel/smc37c669.c
arch/alpha/kernel/srmcons.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_titan.c
arch/alpha/kernel/sys_wildfire.c
arch/alpha/kernel/time.c

index 52231e37131029e781cd4ce3a6f84e3a4a9be87b..b188683b83fd04a4ec8265e4bf1c5c06da8c1694 100644 (file)
@@ -22,7 +22,7 @@
 
 /* Note mask bit is true for DISABLED irqs.  */
 static unsigned int cached_irq_mask = 0xffff;
-static spinlock_t i8259_irq_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(i8259_irq_lock);
 
 static inline void
 i8259_update_irq_hw(unsigned int irq, unsigned long mask)
index b51316cfabf6b97a1c3af5c96b0985aed0999cb7..0a87e466918c2e72fb59e4a5f087a1e5fa268007 100644 (file)
@@ -15,7 +15,7 @@
  * at the same time in multiple CPUs? To be safe I added a spinlock
  * but it can be removed trivially if the palcode is robust against smp.
  */
-spinlock_t srm_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(srm_irq_lock);
 
 static inline void
 srm_enable_irq(unsigned int irq)
index 363267242527f4619a26e8a7530c3d7236996f31..fd467b207f0f9527cfb18596bc5d79747462c597 100644 (file)
@@ -1104,7 +1104,7 @@ static int SMC37c669_xlate_drq(
     int drq 
 );
 
-static spinlock_t smc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(smc_lock);
 \f
 /*
 **++
index 1e09ac5a026a8e7430b3907a9b7421552ff3eb6c..b5660fc3a68ef509d961349bf95f46b10b03eb0e 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/uaccess.h>
 
 
-static spinlock_t srmcons_callback_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(srmcons_callback_lock);
 static int srm_is_registered_console = 0;
 
 /* 
@@ -160,7 +160,7 @@ static int
 srmcons_get_private_struct(struct srmcons_private **ps)
 {
        static struct srmcons_private *srmconsp = NULL;
-       static spinlock_t srmconsp_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(srmconsp_lock);
        unsigned long flags;
        int retval = 0;
 
index 6e334292bbcdfd717bd79521c8d01090906ba784..9e36b07fa940a09e197db647456ceffdb10d2698 100644 (file)
@@ -43,7 +43,7 @@ static unsigned long cached_irq_mask;
 /* dp264 boards handle at max four CPUs */
 static unsigned long cpu_irq_affinity[4] = { 0UL, 0UL, 0UL, 0UL };
 
-spinlock_t dp264_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dp264_irq_lock);
 
 static void
 tsunami_update_irq_hw(unsigned long mask)
index 38d32bc3e84d8cf435ffbf26d814acb83809070e..05888a02a6049415e53b5ac0c84022eb39d5a605 100644 (file)
@@ -42,7 +42,7 @@ static unsigned int hose_irq_masks[4] = {
        0xff0000, 0xfe0000, 0xff0000, 0xff0000
 };
 static unsigned int cached_irq_masks[4];
-spinlock_t rawhide_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rawhide_irq_lock);
 
 static inline void
 rawhide_update_irq_hw(int hose, int mask)
index 17423dd8c4fb249308a5b2a0fc48a330f6ba6b18..a7ff84474aceebc7603455ec09b8180471d09798 100644 (file)
@@ -31,7 +31,7 @@
 #include "pci_impl.h"
 #include "machvec_impl.h"
 
-spinlock_t sable_lynx_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(sable_lynx_irq_lock);
 
 typedef struct irq_swizzle_struct
 {
index 147058fae0c13a5eb7bf2301aac59f48ba919149..5f84417eeb7bee9502d0da72805bc895b864ca0f 100644 (file)
@@ -56,7 +56,7 @@ static unsigned long titan_cached_irq_mask;
 /*
  * Need SMP-safe access to interrupt CSRs
  */
-spinlock_t titan_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(titan_irq_lock);
 
 static void
 titan_update_irq_hw(unsigned long mask)
index 57be096764a05c0a72102d41baa9196889f1a35b..1553f470246e6b74eecb0ba9630982d3a0cf5c97 100644 (file)
@@ -32,7 +32,7 @@
 
 static unsigned long cached_irq_mask[WILDFIRE_NR_IRQS/(sizeof(long)*8)];
 
-spinlock_t wildfire_irq_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(wildfire_irq_lock);
 
 static int doing_init_irq_hw = 0;
 
index e74677115e2b1f9a172745b87da1329eaa6160c5..8226c5cd788ccb142c3676727fb06161cc5cc574 100644 (file)
@@ -63,7 +63,7 @@ extern unsigned long wall_jiffies;    /* kernel/timer.c */
 
 static int set_rtc_mmss(unsigned long);
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 #define TICK_SIZE (tick_nsec / 1000)