Commit 6ec38b86 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup - (ARM26)

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a0764fb0
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <asm/dma.h> #include <asm/dma.h>
spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(dma_spin_lock);
static dma_t dma_chan[MAX_DMA_CHANNELS]; static dma_t dma_chan[MAX_DMA_CHANNELS];
......
...@@ -50,7 +50,7 @@ void __init arc_init_irq(void); ...@@ -50,7 +50,7 @@ void __init arc_init_irq(void);
#define MAX_IRQ_CNT 100000 #define MAX_IRQ_CNT 100000
static volatile unsigned long irq_err_count; static volatile unsigned long irq_err_count;
static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(irq_controller_lock);
struct irqdesc irq_desc[NR_IRQS]; struct irqdesc irq_desc[NR_IRQS];
......
...@@ -56,7 +56,7 @@ void __up(struct semaphore *sem) ...@@ -56,7 +56,7 @@ void __up(struct semaphore *sem)
wake_up(&sem->wait); wake_up(&sem->wait);
} }
static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(semaphore_lock);
void __sched __down(struct semaphore * sem) void __sched __down(struct semaphore * sem)
{ {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#endif #endif
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(kernel_flag);
#endif #endif
#if defined(CONFIG_FPE_NWFPE) #if defined(CONFIG_FPE_NWFPE)
......
...@@ -41,7 +41,7 @@ EXPORT_SYMBOL(jiffies_64); ...@@ -41,7 +41,7 @@ EXPORT_SYMBOL(jiffies_64);
extern unsigned long wall_jiffies; extern unsigned long wall_jiffies;
/* this needs a better home */ /* this needs a better home */
spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(rtc_lock);
/* change this if you have some constant time drift */ /* change this if you have some constant time drift */
#define USECS_PER_JIFFY (1000000/HZ) #define USECS_PER_JIFFY (1000000/HZ)
......
...@@ -171,7 +171,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) { ...@@ -171,7 +171,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) {
dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->thread_info); dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->thread_info);
} }
spinlock_t die_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(die_lock);
/* /*
* This function is protected against re-entrancy. * This function is protected against re-entrancy.
......
...@@ -75,7 +75,7 @@ static struct order orders[] = { ...@@ -75,7 +75,7 @@ static struct order orders[] = {
#define TEST_AND_CLEAR_USED(pg,off) (test_and_clear_bit(off, &USED_MAP(pg))) #define TEST_AND_CLEAR_USED(pg,off) (test_and_clear_bit(off, &USED_MAP(pg)))
#define SET_USED(pg,off) (set_bit(off, &USED_MAP(pg))) #define SET_USED(pg,off) (set_bit(off, &USED_MAP(pg)))
static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(small_page_lock);
static unsigned long __get_small_page(int priority, struct order *order) static unsigned long __get_small_page(int priority, struct order *order)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment