Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:23:44 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:23:44 -0800
commitb854b3defb654cf43eb2c43e3094bd1d1e1132dd (patch)
treefb3cc6617aea30d1e1d12cb06b991c62bdbd3a80
parent0350054a7bcdcf387f72a70b5c0fc7710dfac809 (diff)
[PATCH] Lock initializer cleanup: ARM
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>
-rw-r--r--arch/arm/common/rtctime.c2
-rw-r--r--arch/arm/common/scoop.c2
-rw-r--r--arch/arm/kernel/apm.c2
-rw-r--r--arch/arm/kernel/dma.c2
-rw-r--r--arch/arm/kernel/irq.c2
-rw-r--r--arch/arm/kernel/semaphore.c2
-rw-r--r--arch/arm/kernel/smp.c4
-rw-r--r--arch/arm/kernel/time.c2
-rw-r--r--arch/arm/kernel/traps.c4
-rw-r--r--arch/arm/mach-footbridge/ebsa285-leds.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-leds.c2
-rw-r--r--arch/arm/mach-integrator/core.c2
-rw-r--r--arch/arm/mach-integrator/pci_v3.c2
-rw-r--r--arch/arm/mach-ixp2000/core.c2
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c2
-rw-r--r--arch/arm/mach-omap/clock.c2
-rw-r--r--arch/arm/mach-omap/mux.c2
-rw-r--r--arch/arm/mach-shark/leds.c2
-rw-r--r--arch/arm/mm/consistent.c2
-rw-r--r--arch/arm/mm/copypage-v6.c2
21 files changed, 23 insertions, 23 deletions
diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c
index dc170b3c6f8e..812dac1fa886 100644
--- a/arch/arm/common/rtctime.c
+++ b/arch/arm/common/rtctime.c
@@ -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;
/*
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index dd41da34b0c9..811c55498280 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -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)
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
index 70aade05b50d..b0bbd1e62ebb 100644
--- a/arch/arm/kernel/apm.c
+++ b/arch/arm/kernel/apm.c
@@ -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;
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c
index 0e4b21e03427..2b7883884234 100644
--- a/arch/arm/kernel/dma.c
+++ b/arch/arm/kernel/dma.c
@@ -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
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 5e0656e88918..7d07277e617e 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -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];
diff --git a/arch/arm/kernel/semaphore.c b/arch/arm/kernel/semaphore.c
index 02cc6793417f..ac423e3e224b 100644
--- a/arch/arm/kernel/semaphore.c
+++ b/arch/arm/kernel/semaphore.c
@@ -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)
{
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index cfb0bc1b5914..ecc8c3332408 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -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()
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 3c92fe6f5acf..3c62021fc838 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -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);
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index b80f8cee77f3..f6b444a6e365 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -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)
{
diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c
index 46ce71423d74..2c7c3630401b 100644
--- a/arch/arm/mach-footbridge/ebsa285-leds.c
+++ b/arch/arm/mach-footbridge/ebsa285-leds.c
@@ -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)
{
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 5ec9ea989823..1e1dfd79f4fe 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -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;
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c
index bcf6e6a7c813..7451fc07b85a 100644
--- a/arch/arm/mach-footbridge/netwinder-leds.c
+++ b/arch/arm/mach-footbridge/netwinder-leds.c
@@ -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)
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index eb16dea60768..86c50c3889b7 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -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.
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index e7f66ca5751d..229a63a525cd 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -163,7 +163,7 @@
* 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
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index 4b263419e74a..a98f69aeb48d 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -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;
/*************************************************************************
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index aed8ad6e2acd..94bcdb933e41 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -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
diff --git a/arch/arm/mach-omap/clock.c b/arch/arm/mach-omap/clock.c
index 39d8503c0dd7..be4cc1ffec3b 100644
--- a/arch/arm/mach-omap/clock.c
+++ b/arch/arm/mach-omap/clock.c
@@ -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);
diff --git a/arch/arm/mach-omap/mux.c b/arch/arm/mach-omap/mux.c
index e3771397ba78..bcf3c6e5ecd0 100644
--- a/arch/arm/mach-omap/mux.c
+++ b/arch/arm/mach-omap/mux.c
@@ -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;
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
index 7a2d1e908137..7bdeb70a0c10 100644
--- a/arch/arm/mach-shark/leds.c
+++ b/arch/arm/mach-shark/leds.c
@@ -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);
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index c8f3b022d588..718c4c3d01e5 100644
--- a/arch/arm/mm/consistent.c
+++ b/arch/arm/mm/consistent.c
@@ -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.
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
index 76dcfc9ba155..694ac8208858 100644
--- a/arch/arm/mm/copypage-v6.c
+++ b/arch/arm/mm/copypage-v6.c
@@ -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)