
From: Thomas Gleixner <tglx@linutronix.de>

Character devices converted to use the new lock initializers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/char/ds1286.c               |    2 +-
 25-akpm/drivers/char/ec3104_keyb.c          |    2 +-
 25-akpm/drivers/char/efirtc.c               |    2 +-
 25-akpm/drivers/char/genrtc.c               |    2 +-
 25-akpm/drivers/char/hpet.c                 |    4 ++--
 25-akpm/drivers/char/hvc_console.c          |    2 +-
 25-akpm/drivers/char/hvcs.c                 |    4 ++--
 25-akpm/drivers/char/hw_random.c            |    2 +-
 25-akpm/drivers/char/ipmi/ipmi_msghandler.c |    2 +-
 25-akpm/drivers/char/ipmi/ipmi_watchdog.c   |    2 +-
 25-akpm/drivers/char/mwave/3780i.c          |    2 +-
 25-akpm/drivers/char/nvram.c                |    2 +-
 25-akpm/drivers/char/qtronix.c              |    2 +-
 25-akpm/drivers/char/random.c               |    2 +-
 25-akpm/drivers/char/rtc.c                  |    2 +-
 25-akpm/drivers/char/sysrq.c                |    2 +-
 25-akpm/drivers/char/tty_io.c               |    4 ++--
 25-akpm/drivers/char/viocons.c              |    4 ++--
 18 files changed, 22 insertions(+), 22 deletions(-)

diff -puN drivers/char/ds1286.c~lock-initializer-cleanup-character-devices drivers/char/ds1286.c
--- 25/drivers/char/ds1286.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.493283464 -0800
+++ 25-akpm/drivers/char/ds1286.c	2004-12-03 20:57:15.521279208 -0800
@@ -68,7 +68,7 @@ static int ds1286_set_time(struct rtc_ti
 
 static inline unsigned char ds1286_is_updating(void);
 
-static spinlock_t ds1286_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ds1286_lock);
 
 static int ds1286_read_proc(char *page, char **start, off_t off,
                             int count, int *eof, void *data);
diff -puN drivers/char/ec3104_keyb.c~lock-initializer-cleanup-character-devices drivers/char/ec3104_keyb.c
--- 25/drivers/char/ec3104_keyb.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.495283160 -0800
+++ 25-akpm/drivers/char/ec3104_keyb.c	2004-12-03 20:57:15.522279056 -0800
@@ -92,7 +92,7 @@ static void aux_write_ack(int val);
 static void __aux_write_ack(int val);
 #endif
 
-static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(kbd_controller_lock);
 static unsigned char handle_kbd_event(void);
 
 /* used only by send_data - set by keyboard_interrupt */
diff -puN drivers/char/efirtc.c~lock-initializer-cleanup-character-devices drivers/char/efirtc.c
--- 25/drivers/char/efirtc.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.496283008 -0800
+++ 25-akpm/drivers/char/efirtc.c	2004-12-03 20:57:15.522279056 -0800
@@ -48,7 +48,7 @@
  */
 #define EFI_RTC_EPOCH		1998
 
-static spinlock_t efi_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(efi_rtc_lock);
 
 static int efi_rtc_ioctl(struct inode *inode, struct file *file,
 		     unsigned int cmd, unsigned long arg);
diff -puN drivers/char/genrtc.c~lock-initializer-cleanup-character-devices drivers/char/genrtc.c
--- 25/drivers/char/genrtc.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.497282856 -0800
+++ 25-akpm/drivers/char/genrtc.c	2004-12-03 20:57:15.523278904 -0800
@@ -95,7 +95,7 @@ static void gen_rtc_timer(unsigned long 
 static volatile int stask_active;              /* schedule_work */
 static volatile int ttask_active;              /* timer_task */
 static int stop_rtc_timers;                    /* don't requeue tasks */
-static spinlock_t gen_rtc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gen_rtc_lock);
 
 static void gen_rtc_interrupt(unsigned long arg);
 
diff -puN drivers/char/hpet.c~lock-initializer-cleanup-character-devices drivers/char/hpet.c
--- 25/drivers/char/hpet.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.499282552 -0800
+++ 25-akpm/drivers/char/hpet.c	2004-12-03 20:57:15.524278752 -0800
@@ -52,9 +52,9 @@
 static u32 hpet_ntimer, hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
 
 /* A lock for concurrent access by app and isr hpet activity. */
-static spinlock_t hpet_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hpet_lock);
 /* A lock for concurrent intermodule access to hpet and isr hpet activity. */
-static spinlock_t hpet_task_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hpet_task_lock);
 
 #define	HPET_DEV_NAME	(7)
 
diff -puN drivers/char/hvc_console.c~lock-initializer-cleanup-character-devices drivers/char/hvc_console.c
--- 25/drivers/char/hvc_console.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.500282400 -0800
+++ 25-akpm/drivers/char/hvc_console.c	2004-12-03 20:57:15.525278600 -0800
@@ -94,7 +94,7 @@ static struct list_head hvc_structs = LI
  * Protect the list of hvc_struct instances from inserts and removals during
  * list traversal.
  */
-static spinlock_t hvc_structs_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvc_structs_lock);
 
 /*
  * Initial console vtermnos for console API usage prior to full console
diff -puN drivers/char/hvcs.c~lock-initializer-cleanup-character-devices drivers/char/hvcs.c
--- 25/drivers/char/hvcs.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.501282248 -0800
+++ 25-akpm/drivers/char/hvcs.c	2004-12-03 20:57:15.526278448 -0800
@@ -257,7 +257,7 @@ static struct task_struct *hvcs_task;
 static unsigned long *hvcs_pi_buff;
 
 /* Only allow one hvcs_struct to use the hvcs_pi_buff at a time. */
-static spinlock_t hvcs_pi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvcs_pi_lock);
 
 /* One vty-server per hvcs_struct */
 struct hvcs_struct {
@@ -308,7 +308,7 @@ struct hvcs_struct {
 #define from_kobj(kobj) container_of(kobj, struct hvcs_struct, kobj)
 
 static struct list_head hvcs_structs = LIST_HEAD_INIT(hvcs_structs);
-static spinlock_t hvcs_structs_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hvcs_structs_lock);
 
 static void hvcs_unthrottle(struct tty_struct *tty);
 static void hvcs_throttle(struct tty_struct *tty);
diff -puN drivers/char/hw_random.c~lock-initializer-cleanup-character-devices drivers/char/hw_random.c
--- 25/drivers/char/hw_random.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.503281944 -0800
+++ 25-akpm/drivers/char/hw_random.c	2004-12-03 20:57:15.527278296 -0800
@@ -485,7 +485,7 @@ static int rng_dev_open (struct inode *i
 static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
 			     loff_t * offp)
 {
-	static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(rng_lock);
 	unsigned int have_data;
 	u32 data = 0;
 	ssize_t ret = 0;
diff -puN drivers/char/ipmi/ipmi_msghandler.c~lock-initializer-cleanup-character-devices drivers/char/ipmi/ipmi_msghandler.c
--- 25/drivers/char/ipmi/ipmi_msghandler.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.504281792 -0800
+++ 25-akpm/drivers/char/ipmi/ipmi_msghandler.c	2004-12-03 20:57:15.529277992 -0800
@@ -304,7 +304,7 @@ static DECLARE_RWSEM(interfaces_sem);
 
 /* Directly protects the ipmi_interfaces data structure.  This is
    claimed in the timer interrupt. */
-static spinlock_t interfaces_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(interfaces_lock);
 
 /* List of watchers that want to know when smi's are added and
    deleted. */
diff -puN drivers/char/ipmi/ipmi_watchdog.c~lock-initializer-cleanup-character-devices drivers/char/ipmi/ipmi_watchdog.c
--- 25/drivers/char/ipmi/ipmi_watchdog.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.506281488 -0800
+++ 25-akpm/drivers/char/ipmi/ipmi_watchdog.c	2004-12-03 20:57:15.530277840 -0800
@@ -157,7 +157,7 @@ static char preaction[16] = "pre_none";
 static unsigned char preop_val = WDOG_PREOP_NONE;
 
 static char preop[16] = "preop_none";
-static spinlock_t ipmi_read_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ipmi_read_lock);
 static char data_to_read = 0;
 static DECLARE_WAIT_QUEUE_HEAD(read_q);
 static struct fasync_struct *fasync_q = NULL;
diff -puN drivers/char/mwave/3780i.c~lock-initializer-cleanup-character-devices drivers/char/mwave/3780i.c
--- 25/drivers/char/mwave/3780i.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.507281336 -0800
+++ 25-akpm/drivers/char/mwave/3780i.c	2004-12-03 20:57:15.531277688 -0800
@@ -61,7 +61,7 @@
 #include "mwavedd.h"
 #include "3780i.h"
 
-static spinlock_t dsp_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(dsp_lock);
 static unsigned long flags;
 
 
diff -puN drivers/char/nvram.c~lock-initializer-cleanup-character-devices drivers/char/nvram.c
--- 25/drivers/char/nvram.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.509281032 -0800
+++ 25-akpm/drivers/char/nvram.c	2004-12-03 20:57:15.531277688 -0800
@@ -133,7 +133,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-static spinlock_t nvram_state_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nvram_state_lock);
 static int nvram_open_cnt;	/* #times opened */
 static int nvram_open_mode;	/* special open modes */
 #define NVRAM_WRITE		1 /* opened for writing (exclusive) */
diff -puN drivers/char/qtronix.c~lock-initializer-cleanup-character-devices drivers/char/qtronix.c
--- 25/drivers/char/qtronix.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.510280880 -0800
+++ 25-akpm/drivers/char/qtronix.c	2004-12-03 20:57:15.532277536 -0800
@@ -350,7 +350,7 @@ static int handle_data(unsigned char *p_
 }
 
 
-spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(kbd_controller_lock);
 static unsigned char handle_kbd_event(void);
 
 
diff -puN drivers/char/random.c~lock-initializer-cleanup-character-devices drivers/char/random.c
--- 25/drivers/char/random.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.512280576 -0800
+++ 25-akpm/drivers/char/random.c	2004-12-03 20:57:15.534277232 -0800
@@ -669,7 +669,7 @@ struct sample {
 
 static struct sample *batch_entropy_pool, *batch_entropy_copy;
 static int	batch_head, batch_tail;
-static spinlock_t batch_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(batch_lock);
 
 static int	batch_max;
 static void batch_entropy_process(void *private_);
diff -puN drivers/char/rtc.c~lock-initializer-cleanup-character-devices drivers/char/rtc.c
--- 25/drivers/char/rtc.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.513280424 -0800
+++ 25-akpm/drivers/char/rtc.c	2004-12-03 20:57:15.535277080 -0800
@@ -177,7 +177,7 @@ static unsigned long rtc_max_user_freq =
 /*
  * rtc_task_lock nests inside rtc_lock.
  */
-static spinlock_t rtc_task_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtc_task_lock);
 static rtc_task_t *rtc_callback = NULL;
 #endif
 
diff -puN drivers/char/sysrq.c~lock-initializer-cleanup-character-devices drivers/char/sysrq.c
--- 25/drivers/char/sysrq.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.514280272 -0800
+++ 25-akpm/drivers/char/sysrq.c	2004-12-03 20:57:15.536276928 -0800
@@ -272,7 +272,7 @@ static struct sysrq_key_op sysrq_unrt_op
 };
 
 /* Key Operations table and lock */
-static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sysrq_key_table_lock);
 #define SYSRQ_KEY_TABLE_LENGTH 36
 static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
 /* 0 */	&sysrq_loglevel_op,
diff -puN drivers/char/tty_io.c~lock-initializer-cleanup-character-devices drivers/char/tty_io.c
--- 25/drivers/char/tty_io.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.516279968 -0800
+++ 25-akpm/drivers/char/tty_io.c	2004-12-03 20:57:15.538276624 -0800
@@ -251,7 +251,7 @@ static void tty_set_termios_ldisc(struct
  *	callers who will do ldisc lookups and cannot sleep.
  */
  
-static spinlock_t tty_ldisc_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tty_ldisc_lock);
 static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait);
 static struct tty_ldisc tty_ldiscs[NR_LDISCS];	/* line disc dispatch table	*/
 
@@ -692,7 +692,7 @@ static struct file_operations hung_up_tt
 	.release	= tty_release,
 };
 
-static spinlock_t redirect_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(redirect_lock);
 static struct file *redirect;
 
 /**
diff -puN drivers/char/viocons.c~lock-initializer-cleanup-character-devices drivers/char/viocons.c
--- 25/drivers/char/viocons.c~lock-initializer-cleanup-character-devices	2004-12-03 20:57:15.518279664 -0800
+++ 25-akpm/drivers/char/viocons.c	2004-12-03 20:57:15.539276472 -0800
@@ -61,8 +61,8 @@
 #define VIOCONS_KERN_WARN	KERN_WARNING "viocons: "
 #define VIOCONS_KERN_INFO	KERN_INFO "viocons: "
 
-static spinlock_t consolelock = SPIN_LOCK_UNLOCKED;
-static spinlock_t consoleloglock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(consolelock);
+static DEFINE_SPINLOCK(consoleloglock);
 
 #ifdef CONFIG_MAGIC_SYSRQ
 static int vio_sysrq_pressed;
_
