Commit 243bb4dd authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: UserMode

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 a93352c9
......@@ -538,7 +538,7 @@ static int create_proc_mconsole(void)
return(0);
}
static spinlock_t notify_spinlock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(notify_spinlock);
void lock_notify(void)
{
......
......@@ -32,7 +32,7 @@
#define DRIVER_NAME "uml-netdev"
static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(opened_lock);
LIST_HEAD(opened);
static int uml_net_rx(struct net_device *dev)
......@@ -282,7 +282,7 @@ void uml_net_user_timer_expire(unsigned long _conn)
#endif
}
static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(devices_lock);
static struct list_head devices = LIST_HEAD_INIT(devices);
static struct device_driver uml_net_driver = {
......
......@@ -110,8 +110,8 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
#define DRIVER_NAME "uml-blkdev"
static spinlock_t ubd_io_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t ubd_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(ubd_io_lock);
static DEFINE_SPINLOCK(ubd_lock);
static void (*do_ubd)(void);
......
......@@ -109,7 +109,7 @@ int um_request_irq(unsigned int irq, int fd, int type,
EXPORT_SYMBOL(um_request_irq);
EXPORT_SYMBOL(reactivate_fd);
static spinlock_t irq_spinlock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(irq_spinlock);
unsigned long irq_lock(void)
{
......
......@@ -39,7 +39,7 @@ int write_sigio_irq(int fd)
return(0);
}
static spinlock_t sigio_spinlock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(sigio_spinlock);
void sigio_lock(void)
{
......
......@@ -216,7 +216,7 @@ int hard_smp_processor_id(void)
return(pid_to_processor_id(os_getpid()));
}
static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(call_lock);
static atomic_t scf_started;
static atomic_t scf_finished;
static void (*func)(void *info);
......
......@@ -159,7 +159,7 @@ long execute_syscall(void *r)
return(CHOOSE_MODE_PROC(execute_syscall_tt, execute_syscall_skas, r));
}
spinlock_t syscall_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(syscall_lock);
static int syscall_index = 0;
......
......@@ -161,7 +161,7 @@ void timer_handler(int sig, union uml_pt_regs *regs)
timer_irq(regs);
}
static spinlock_t timer_spinlock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(timer_spinlock);
unsigned long time_lock(void)
{
......
......@@ -221,7 +221,7 @@ void trap_init(void)
{
}
spinlock_t trap_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(trap_lock);
static int trap_index = 0;
......
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