Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:18:33 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:18:33 -0800
commit243bb4dd73d6f606b7c960755d6e180fd4745649 (patch)
tree73fbd25b15983c27852286388a407525159483cd
parenta93352c98378bec95647cf1e75b25734dca4bf01 (diff)
[PATCH] Lock initializer cleanup: UserMode
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/um/drivers/mconsole_kern.c2
-rw-r--r--arch/um/drivers/net_kern.c4
-rw-r--r--arch/um/drivers/ubd_kern.c4
-rw-r--r--arch/um/kernel/irq.c2
-rw-r--r--arch/um/kernel/sigio_kern.c2
-rw-r--r--arch/um/kernel/smp.c2
-rw-r--r--arch/um/kernel/syscall_kern.c2
-rw-r--r--arch/um/kernel/time_kern.c2
-rw-r--r--arch/um/kernel/trap_kern.c2
9 files changed, 11 insertions, 11 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index ecbabd351c6d..d7c7adcc0a67 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -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)
{
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 071322d048a4..fe1e79a46c3f 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -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 = {
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 2549ef486013..9b4820ec993a 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -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);
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index e0378cdfe899..d71e8f00810f 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -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)
{
diff --git a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c
index 11297378f705..229988463c4c 100644
--- a/arch/um/kernel/sigio_kern.c
+++ b/arch/um/kernel/sigio_kern.c
@@ -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)
{
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 417bb5a88e2a..e916391383cb 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -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);
diff --git a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c
index a294e5071fe8..93aab676469b 100644
--- a/arch/um/kernel/syscall_kern.c
+++ b/arch/um/kernel/syscall_kern.c
@@ -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;
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
index df21b0529ae6..c949212e1032 100644
--- a/arch/um/kernel/time_kern.c
+++ b/arch/um/kernel/time_kern.c
@@ -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)
{
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c
index 80d07fe6b979..1d211c63164a 100644
--- a/arch/um/kernel/trap_kern.c
+++ b/arch/um/kernel/trap_kern.c
@@ -221,7 +221,7 @@ void trap_init(void)
{
}
-spinlock_t trap_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(trap_lock);
static int trap_index = 0;