From: Thomas Gleixner Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton --- 25-akpm/arch/x86_64/kernel/i8259.c | 2 +- 25-akpm/arch/x86_64/kernel/io_apic.c | 2 +- 25-akpm/arch/x86_64/kernel/nmi.c | 2 +- 25-akpm/arch/x86_64/kernel/pci-gart.c | 2 +- 25-akpm/arch/x86_64/kernel/smp.c | 4 ++-- 25-akpm/arch/x86_64/kernel/time.c | 4 ++-- 25-akpm/arch/x86_64/kernel/traps.c | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff -puN arch/x86_64/kernel/i8259.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/i8259.c --- 25/arch/x86_64/kernel/i8259.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/i8259.c Wed Jan 12 16:54:54 2005 @@ -130,7 +130,7 @@ void (*interrupt[NR_IRQS])(void) = { * moves to arch independent land */ -spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(i8259A_lock); static void end_8259A_irq (unsigned int irq) { diff -puN arch/x86_64/kernel/io_apic.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/io_apic.c --- 25/arch/x86_64/kernel/io_apic.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/io_apic.c Wed Jan 12 16:54:54 2005 @@ -42,7 +42,7 @@ int sis_apic_bug; /* not actually supported, dummy for compile */ -static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(ioapic_lock); /* * # of IRQ routing registers diff -puN arch/x86_64/kernel/nmi.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/nmi.c --- 25/arch/x86_64/kernel/nmi.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/nmi.c Wed Jan 12 16:54:54 2005 @@ -43,7 +43,7 @@ * This is maintained separately from nmi_active because the NMI * watchdog may also be driven from the I/O APIC timer. */ -static spinlock_t lapic_nmi_owner_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(lapic_nmi_owner_lock); static unsigned int lapic_nmi_owner; #define LAPIC_NMI_WATCHDOG (1<<0) #define LAPIC_NMI_RESERVED (1<<1) diff -puN arch/x86_64/kernel/pci-gart.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/pci-gart.c --- 25/arch/x86_64/kernel/pci-gart.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/pci-gart.c Wed Jan 12 16:54:54 2005 @@ -65,7 +65,7 @@ int iommu_bio_merge = 0; #define MAX_NB 8 /* Allocation bitmap for the remapping area */ -static spinlock_t iommu_bitmap_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(iommu_bitmap_lock); static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */ static u32 gart_unmapped_entry; diff -puN arch/x86_64/kernel/smp.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/smp.c --- 25/arch/x86_64/kernel/smp.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/smp.c Wed Jan 12 16:54:54 2005 @@ -40,7 +40,7 @@ static cpumask_t flush_cpumask; static struct mm_struct * flush_mm; static unsigned long flush_va; -static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(tlbstate_lock); #define FLUSH_ALL 0xffffffff /* @@ -269,7 +269,7 @@ void smp_send_reschedule(int cpu) * Structure and data for smp_call_function(). This is designed to minimise * static memory requirements. It also looks cleaner. */ -static spinlock_t call_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(call_lock); struct call_data_struct { void (*func) (void *info); diff -puN arch/x86_64/kernel/time.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/time.c --- 25/arch/x86_64/kernel/time.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/time.c Wed Jan 12 16:54:54 2005 @@ -49,8 +49,8 @@ static void cpufreq_delayed_get(void); extern int using_apic_timer; -spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; -spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(rtc_lock); +DEFINE_SPINLOCK(i8253_lock); static int nohpet __initdata = 0; static int notsc __initdata = 0; diff -puN arch/x86_64/kernel/traps.c~lock-initializer-cleanup-x86_64 arch/x86_64/kernel/traps.c --- 25/arch/x86_64/kernel/traps.c~lock-initializer-cleanup-x86_64 Wed Jan 12 16:54:54 2005 +++ 25-akpm/arch/x86_64/kernel/traps.c Wed Jan 12 16:54:54 2005 @@ -74,7 +74,7 @@ asmlinkage void spurious_interrupt_bug(v asmlinkage void call_debug(void); struct notifier_block *die_chain; -static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(die_notifier_lock); int register_die_notifier(struct notifier_block *nb) { @@ -324,7 +324,7 @@ void out_of_line_bug(void) BUG(); } -static spinlock_t die_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(die_lock); static int die_owner = -1; void oops_begin(void) _