Commit b854b3de authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: ARM

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 0350054a
...@@ -28,7 +28,7 @@ static struct fasync_struct *rtc_async_queue; ...@@ -28,7 +28,7 @@ static struct fasync_struct *rtc_async_queue;
/* /*
* rtc_lock protects rtc_irq_data * 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; static unsigned long rtc_irq_data;
/* /*
......
...@@ -31,7 +31,7 @@ void reset_scoop(void) ...@@ -31,7 +31,7 @@ void reset_scoop(void)
SCOOP_REG(SCOOP_IRM) = 0x0000; SCOOP_REG(SCOOP_IRM) = 0x0000;
} }
static spinlock_t scoop_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(scoop_lock);
static u32 scoop_gpwr; static u32 scoop_gpwr;
unsigned short set_scoop_gpio(unsigned short bit) unsigned short set_scoop_gpio(unsigned short bit)
......
...@@ -97,7 +97,7 @@ static LIST_HEAD(apm_user_list); ...@@ -97,7 +97,7 @@ static LIST_HEAD(apm_user_list);
*/ */
static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait); static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait);
static DECLARE_COMPLETION(kapmd_exit); 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; static struct apm_queue kapmd_queue;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <asm/mach/dma.h> #include <asm/mach/dma.h>
spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(dma_spin_lock);
#if MAX_DMA_CHANNELS > 0 #if MAX_DMA_CHANNELS > 0
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
static int noirqdebug; static int noirqdebug;
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);
static LIST_HEAD(irq_pending); static LIST_HEAD(irq_pending);
struct irqdesc irq_desc[NR_IRQS]; struct irqdesc irq_desc[NR_IRQS];
......
...@@ -54,7 +54,7 @@ void __up(struct semaphore *sem) ...@@ -54,7 +54,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)
{ {
......
...@@ -66,7 +66,7 @@ struct smp_call_struct { ...@@ -66,7 +66,7 @@ struct smp_call_struct {
}; };
static struct smp_call_struct * volatile smp_call_function_data; 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) int __init __cpu_up(unsigned int cpu)
{ {
...@@ -284,7 +284,7 @@ static void ipi_call_function(unsigned int cpu) ...@@ -284,7 +284,7 @@ static void ipi_call_function(unsigned int cpu)
cpu_clear(cpu, data->unfinished); 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() * ipi_cpu_stop - handle IPI from smp_send_stop()
......
...@@ -48,7 +48,7 @@ struct sys_timer *system_timer; ...@@ -48,7 +48,7 @@ struct sys_timer *system_timer;
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);
#ifdef CONFIG_SA1100_RTC_MODULE #ifdef CONFIG_SA1100_RTC_MODULE
EXPORT_SYMBOL(rtc_lock); EXPORT_SYMBOL(rtc_lock);
......
...@@ -200,7 +200,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) ...@@ -200,7 +200,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
barrier(); barrier();
} }
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.
...@@ -241,7 +241,7 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err) ...@@ -241,7 +241,7 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err)
} }
static LIST_HEAD(undef_hook); 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) void register_undef_hook(struct undef_hook *hook)
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static char led_state; static char led_state;
static char hw_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) static void ebsa285_leds_event(led_event_t evt)
{ {
......
...@@ -68,7 +68,7 @@ static inline void wb977_ww(int reg, int val) ...@@ -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 * 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_op;
static unsigned int current_gpio_io; static unsigned int current_gpio_io;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static char led_state; static char led_state;
static char hw_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; extern spinlock_t gpio_lock;
static void netwinder_leds_event(led_event_t evt) static void netwinder_leds_event(led_event_t evt)
......
...@@ -115,7 +115,7 @@ arch_initcall(integrator_init); ...@@ -115,7 +115,7 @@ arch_initcall(integrator_init);
#define CM_CTRL IO_ADDRESS(INTEGRATOR_HDR_BASE) + INTEGRATOR_HDR_CTRL_OFFSET #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. * cm_control - update the CM_CTRL register.
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
* 7:2 register number * 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_START 0x00000000
#define PCI_BUS_NONMEM_SIZE SZ_256M #define PCI_BUS_NONMEM_SIZE SZ_256M
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/mach/irq.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; static unsigned long ixp2000_slowport_irq_flags;
/************************************************************************* /*************************************************************************
......
...@@ -53,7 +53,7 @@ unsigned long ixp4xx_pci_reg_base = 0; ...@@ -53,7 +53,7 @@ unsigned long ixp4xx_pci_reg_base = 0;
* these transactions are atomic or we will end up * these transactions are atomic or we will end up
* with corrupt data on the bus or in a driver. * 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 * Read from PCI config space
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
static LIST_HEAD(clocks); static LIST_HEAD(clocks);
static DECLARE_MUTEX(clocks_sem); 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); static void propagate_rate(struct clk * clk);
/* MPU virtual clock functions */ /* MPU virtual clock functions */
static int select_table_rate(unsigned long rate); static int select_table_rate(unsigned long rate);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
int __init_or_module int __init_or_module
omap_cfg_reg(const reg_cfg_t reg_cfg) 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; unsigned long flags;
reg_cfg_set *cfg; reg_cfg_set *cfg;
......
...@@ -33,7 +33,7 @@ static char led_state; ...@@ -33,7 +33,7 @@ static char led_state;
static short hw_led_state; static short hw_led_state;
static short saved_state; static short saved_state;
static spinlock_t leds_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(leds_lock);
short sequoia_read(int addr) { short sequoia_read(int addr) {
outw(addr,0x24); outw(addr,0x24);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* This is the page table (2MB) covering uncached, DMA consistent allocations * This is the page table (2MB) covering uncached, DMA consistent allocations
*/ */
static pte_t *consistent_pte; static pte_t *consistent_pte;
static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(consistent_lock);
/* /*
* VM region handling support. * VM region handling support.
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
static pte_t *from_pte; static pte_t *from_pte;
static pte_t *to_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) #define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
......
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