]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup: ARM
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:23:44 +0000 (16:23 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:23:44 +0000 (16:23 -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>
21 files changed:
arch/arm/common/rtctime.c
arch/arm/common/scoop.c
arch/arm/kernel/apm.c
arch/arm/kernel/dma.c
arch/arm/kernel/irq.c
arch/arm/kernel/semaphore.c
arch/arm/kernel/smp.c
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/mach-footbridge/ebsa285-leds.c
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-footbridge/netwinder-leds.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-omap/clock.c
arch/arm/mach-omap/mux.c
arch/arm/mach-shark/leds.c
arch/arm/mm/consistent.c
arch/arm/mm/copypage-v6.c

index dc170b3c6f8ea973403c1a2de6d542cc01831926..812dac1fa8863d7d0594e70af95b6d1121027943 100644 (file)
@@ -28,7 +28,7 @@ static struct fasync_struct *rtc_async_queue;
 /*
  * rtc_lock protects rtc_irq_data
  */
-static spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtc_lock);
 static unsigned long rtc_irq_data;
 
 /*
index dd41da34b0c977650523c20d2bc1b0a001ed21bd..811c554982804484c54889c5b513ecb8129a3696 100644 (file)
@@ -31,7 +31,7 @@ void reset_scoop(void)
        SCOOP_REG(SCOOP_IRM) = 0x0000;
 }
 
-static spinlock_t scoop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(scoop_lock);
 static u32 scoop_gpwr;
 
 unsigned short set_scoop_gpio(unsigned short bit)
index 70aade05b50d224728f3a6599da2d9b210d29050..b0bbd1e62ebb70e107268ce7b176de0ffcd13c8e 100644 (file)
@@ -97,7 +97,7 @@ static LIST_HEAD(apm_user_list);
  */
 static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
 static DECLARE_COMPLETION(kapmd_exit);
-static spinlock_t kapmd_queue_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kapmd_queue_lock);
 static struct apm_queue kapmd_queue;
 
 
index 0e4b21e03427ea549798e0ab902c33990e503c67..2b78838842346da390e8547cd37035184376d506 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <asm/mach/dma.h>
 
-spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(dma_spin_lock);
 
 #if MAX_DMA_CHANNELS > 0
 
index 5e0656e889185e5d7000c0e1cfc2904312c73dc6..7d07277e617e341594aa0055f37adb553fb0770b 100644 (file)
@@ -49,7 +49,7 @@
 
 static int noirqdebug;
 static volatile unsigned long irq_err_count;
-static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_controller_lock);
 static LIST_HEAD(irq_pending);
 
 struct irqdesc irq_desc[NR_IRQS];
index 02cc6793417fac9adb845f9b45497adf427803f2..ac423e3e224be9d27b5a5dba934f0bb60450a82d 100644 (file)
@@ -54,7 +54,7 @@ void __up(struct semaphore *sem)
        wake_up(&sem->wait);
 }
 
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
 
 void __sched __down(struct semaphore * sem)
 {
index cfb0bc1b59140f48691f1d110678696e73a6d7ac..ecc8c3332408a1c7ed394b6badcd3b608baf156c 100644 (file)
@@ -66,7 +66,7 @@ struct smp_call_struct {
 };
 
 static struct smp_call_struct * volatile smp_call_function_data;
-static spinlock_t smp_call_function_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(smp_call_function_lock);
 
 int __init __cpu_up(unsigned int cpu)
 {
@@ -284,7 +284,7 @@ static void ipi_call_function(unsigned int cpu)
                cpu_clear(cpu, data->unfinished);
 }
 
-static spinlock_t stop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stop_lock);
 
 /*
  * ipi_cpu_stop - handle IPI from smp_send_stop()
index 3c92fe6f5acf42739331e2bd1fe553ed7bd7a759..3c62021fc838c389f4f1f3567078a98d9283e325 100644 (file)
@@ -48,7 +48,7 @@ struct sys_timer *system_timer;
 extern unsigned long wall_jiffies;
 
 /* this needs a better home */
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 #ifdef CONFIG_SA1100_RTC_MODULE
 EXPORT_SYMBOL(rtc_lock);
index b80f8cee77f3658f829df3d8f8c927ca8179e7a2..f6b444a6e365efba2404aa4e36140e66a9003354 100644 (file)
@@ -200,7 +200,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
        barrier();
 }
 
-spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(die_lock);
 
 /*
  * This function is protected against re-entrancy.
@@ -241,7 +241,7 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err)
 }
 
 static LIST_HEAD(undef_hook);
-static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(undef_lock);
 
 void register_undef_hook(struct undef_hook *hook)
 {
index 46ce71423d74acd1beb17b42c39a429a5a6b6efc..2c7c3630401bd2968544653331380dd719ab29a0 100644 (file)
@@ -32,7 +32,7 @@
 static char led_state;
 static char hw_led_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 
 static void ebsa285_leds_event(led_event_t evt)
 {
index 5ec9ea989823b5b28ea2a5e804f0593a03fc112e..1e1dfd79f4feb583b7d1018f83a884813bc26d36 100644 (file)
@@ -68,7 +68,7 @@ static inline void wb977_ww(int reg, int val)
 /*
  * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE
  */
-spinlock_t gpio_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(gpio_lock);
 
 static unsigned int current_gpio_op;
 static unsigned int current_gpio_io;
index bcf6e6a7c81386d2c18b6086a1cf93eb3663ec33..7451fc07b85aa48199603f8603796d1be7af334f 100644 (file)
@@ -32,7 +32,7 @@
 static char led_state;
 static char hw_led_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 extern spinlock_t gpio_lock;
 
 static void netwinder_leds_event(led_event_t evt)
index eb16dea6076889c118f6cf18eae59ae595623ca4..86c50c3889b78ef7591f994241ea3e331e1742e3 100644 (file)
@@ -115,7 +115,7 @@ arch_initcall(integrator_init);
 
 #define CM_CTRL        IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_CTRL_OFFSET
 
-static spinlock_t cm_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cm_lock);
 
 /**
  * cm_control - update the CM_CTRL register.
index e7f66ca5751d8bff2fc4cec3a94b935f3c1565e9..229a63a525cdd353bea66351f3bbbe9f70b492d4 100644 (file)
  *      7:2    register number
  *  
  */
-static spinlock_t v3_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(v3_lock);
 
 #define PCI_BUS_NONMEM_START   0x00000000
 #define PCI_BUS_NONMEM_SIZE    SZ_256M
index 4b263419e74ab5dd91e2bad5baaea8b9cc32e569..a98f69aeb48d4292436547f3ab8d3af9455fb887 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
 
-static spinlock_t ixp2000_slowport_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ixp2000_slowport_lock);
 static unsigned long ixp2000_slowport_irq_flags;
 
 /*************************************************************************
index aed8ad6e2acdaf3fa8826720aff2f10d915ec39d..94bcdb933e41f1f0065b12154f9d1a5f3f7c7e36 100644 (file)
@@ -53,7 +53,7 @@ unsigned long ixp4xx_pci_reg_base = 0;
  * these transactions are atomic or we will end up
  * with corrupt data on the bus or in a driver.
  */
-static spinlock_t ixp4xx_pci_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ixp4xx_pci_lock);
 
 /*
  * Read from PCI config space
index 39d8503c0dd785ae0abcf54e57bb6ef1cba834bf..be4cc1ffec3b09b9c7e401ba1e636b9bc2a9105c 100644 (file)
@@ -22,7 +22,7 @@
 
 static LIST_HEAD(clocks);
 static DECLARE_MUTEX(clocks_sem);
-static spinlock_t clockfw_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(clockfw_lock);
 static void propagate_rate(struct clk *  clk);
 /* MPU virtual clock functions */
 static int select_table_rate(unsigned long rate);
index e3771397ba783b95a48048b792d3e51125816f1a..bcf3c6e5ecd06802b3a11d3ad85250f0dd21a95b 100644 (file)
@@ -40,7 +40,7 @@
 int __init_or_module
 omap_cfg_reg(const reg_cfg_t reg_cfg)
 {
-       static spinlock_t mux_spin_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(mux_spin_lock);
 
        unsigned long flags;
        reg_cfg_set *cfg;
index 7a2d1e9081372ca379d0855e6e88a89dcdb58236..7bdeb70a0c10dbfb437423eac1ff31d0653891c9 100644 (file)
@@ -33,7 +33,7 @@ static char led_state;
 static short hw_led_state;
 static short saved_state;
 
-static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(leds_lock);
 
 short sequoia_read(int addr) {
   outw(addr,0x24);
index c8f3b022d58820d2b7bb80bd05e5b42e40db750f..718c4c3d01e50709e85877283dfc4ba77db1b433 100644 (file)
@@ -30,7 +30,7 @@
  * This is the page table (2MB) covering uncached, DMA consistent allocations
  */
 static pte_t *consistent_pte;
-static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consistent_lock);
 
 /*
  * VM region handling support.
index 76dcfc9ba155746842922f6f233d9ba230cca9d2..694ac8208858a9c54475f8f3173b71cca7787d4e 100644 (file)
@@ -28,7 +28,7 @@
 
 static pte_t *from_pte;
 static pte_t *to_pte;
-static spinlock_t v6_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(v6_lock);
 
 #define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)