diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-09-09 16:10:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:48 -0400 |
commit | a9f6a0dd54efea2a5d57a27e6c232f9197c25154 (patch) | |
tree | 1df64545ed43cd23d32201b2f2077c9325dc6ba0 | |
parent | 8d06afab73a75f40ae2864e6c296356bab1ab473 (diff) |
[PATCH] more SPIN_LOCK_UNLOCKED -> DEFINE_SPINLOCK conversions
This converts the final 20 DEFINE_SPINLOCK holdouts. (another 580 places
are already using DEFINE_SPINLOCK). Build tested on x86.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/arm/mach-pxa/corgi_ssp.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpnet.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/genrtc.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/i8259.c | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/hdpu.c | 2 | ||||
-rw-r--r-- | arch/ppc/syslib/mv64x60.c | 2 | ||||
-rw-r--r-- | arch/ppc/syslib/qspan_pci.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pmc.c | 2 | ||||
-rw-r--r-- | arch/sparc/lib/atomic32.c | 2 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/parisc/iosapic.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ch.c | 2 | ||||
-rw-r--r-- | drivers/video/geode/display_gx1.c | 2 | ||||
-rw-r--r-- | fs/xfs/support/ktrace.c | 2 | ||||
-rw-r--r-- | net/core/netpoll.c | 4 | ||||
-rw-r--r-- | net/core/pktgen.c | 2 |
17 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index 8ccffba0018f..366a9bde3d8b 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <asm/arch/corgi.h> | 22 | #include <asm/arch/corgi.h> |
23 | #include <asm/arch/pxa-regs.h> | 23 | #include <asm/arch/pxa-regs.h> |
24 | 24 | ||
25 | static spinlock_t corgi_ssp_lock = SPIN_LOCK_UNLOCKED; | 25 | static DEFINE_SPINLOCK(corgi_ssp_lock); |
26 | static struct ssp_dev corgi_ssp_dev; | 26 | static struct ssp_dev corgi_ssp_dev; |
27 | static struct ssp_state corgi_ssp_state; | 27 | static struct ssp_state corgi_ssp_state; |
28 | 28 | ||
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 4ad97b3b39dc..1650353e3f77 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -497,7 +497,7 @@ typedef struct { | |||
497 | static pfm_stats_t pfm_stats[NR_CPUS]; | 497 | static pfm_stats_t pfm_stats[NR_CPUS]; |
498 | static pfm_session_t pfm_sessions; /* global sessions information */ | 498 | static pfm_session_t pfm_sessions; /* global sessions information */ |
499 | 499 | ||
500 | static spinlock_t pfm_alt_install_check = SPIN_LOCK_UNLOCKED; | 500 | static DEFINE_SPINLOCK(pfm_alt_install_check); |
501 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; | 501 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; |
502 | 502 | ||
503 | static struct proc_dir_entry *perfmon_dir; | 503 | static struct proc_dir_entry *perfmon_dir; |
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index d0c2c114a459..e5c6d3c0a8e9 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c | |||
@@ -130,7 +130,7 @@ struct net_device *xpnet_device; | |||
130 | */ | 130 | */ |
131 | static u64 xpnet_broadcast_partitions; | 131 | static u64 xpnet_broadcast_partitions; |
132 | /* protect above */ | 132 | /* protect above */ |
133 | static spinlock_t xpnet_broadcast_lock = SPIN_LOCK_UNLOCKED; | 133 | static DEFINE_SPINLOCK(xpnet_broadcast_lock); |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Since the Block Transfer Engine (BTE) is being used for the transfer | 136 | * Since the Block Transfer Engine (BTE) is being used for the transfer |
diff --git a/arch/mips/kernel/genrtc.c b/arch/mips/kernel/genrtc.c index 288bf51ad4ec..71416e7bbbaa 100644 --- a/arch/mips/kernel/genrtc.c +++ b/arch/mips/kernel/genrtc.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/rtc.h> | 14 | #include <asm/rtc.h> |
15 | #include <asm/time.h> | 15 | #include <asm/time.h> |
16 | 16 | ||
17 | static spinlock_t mips_rtc_lock = SPIN_LOCK_UNLOCKED; | 17 | static DEFINE_SPINLOCK(mips_rtc_lock); |
18 | 18 | ||
19 | unsigned int get_rtc_time(struct rtc_time *time) | 19 | unsigned int get_rtc_time(struct rtc_time *time) |
20 | { | 20 | { |
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index 7eec7568bfea..447759201d1d 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -31,7 +31,7 @@ void disable_8259A_irq(unsigned int irq); | |||
31 | * moves to arch independent land | 31 | * moves to arch independent land |
32 | */ | 32 | */ |
33 | 33 | ||
34 | spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED; | 34 | spinlock_t DEFINE_SPINLOCK(i8259A_lock); |
35 | 35 | ||
36 | static void end_8259A_irq (unsigned int irq) | 36 | static void end_8259A_irq (unsigned int irq) |
37 | { | 37 | { |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index b659d7b3d747..ff3796860123 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -58,7 +58,7 @@ static void parse_bootinfo(unsigned long r3, | |||
58 | static void hdpu_set_l1pe(void); | 58 | static void hdpu_set_l1pe(void); |
59 | static void hdpu_cpustate_set(unsigned char new_state); | 59 | static void hdpu_cpustate_set(unsigned char new_state); |
60 | #ifdef CONFIG_SMP | 60 | #ifdef CONFIG_SMP |
61 | static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; | 61 | static DEFINE_SPINLOCK(timebase_lock); |
62 | static unsigned int timebase_upper = 0, timebase_lower = 0; | 62 | static unsigned int timebase_upper = 0, timebase_lower = 0; |
63 | extern int smp_tb_synchronized; | 63 | extern int smp_tb_synchronized; |
64 | 64 | ||
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 6262b11f366f..839f8872826f 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | u8 mv64x60_pci_exclude_bridge = 1; | 33 | u8 mv64x60_pci_exclude_bridge = 1; |
34 | spinlock_t mv64x60_lock = SPIN_LOCK_UNLOCKED; | 34 | DEFINE_SPINLOCK(mv64x60_lock); |
35 | 35 | ||
36 | static phys_addr_t mv64x60_bridge_pbase; | 36 | static phys_addr_t mv64x60_bridge_pbase; |
37 | static void *mv64x60_bridge_vbase; | 37 | static void *mv64x60_bridge_vbase; |
diff --git a/arch/ppc/syslib/qspan_pci.c b/arch/ppc/syslib/qspan_pci.c index 57f4ed5e5ae1..0970b5d30391 100644 --- a/arch/ppc/syslib/qspan_pci.c +++ b/arch/ppc/syslib/qspan_pci.c | |||
@@ -94,7 +94,7 @@ | |||
94 | #define mk_config_type1(bus, dev, offset) \ | 94 | #define mk_config_type1(bus, dev, offset) \ |
95 | mk_config_addr(bus, dev, offset) | 1; | 95 | mk_config_addr(bus, dev, offset) | 1; |
96 | 96 | ||
97 | static spinlock_t pcibios_lock = SPIN_LOCK_UNLOCKED; | 97 | static DEFINE_SPINLOCK(pcibios_lock); |
98 | 98 | ||
99 | int qspan_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn, | 99 | int qspan_pcibios_read_config_byte(unsigned char bus, unsigned char dev_fn, |
100 | unsigned char offset, unsigned char *val) | 100 | unsigned char offset, unsigned char *val) |
diff --git a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c index cdfec7438d01..63d9481c3ec2 100644 --- a/arch/ppc64/kernel/pmc.c +++ b/arch/ppc64/kernel/pmc.c | |||
@@ -26,7 +26,7 @@ static void dummy_perf(struct pt_regs *regs) | |||
26 | mtspr(SPRN_MMCR0, mmcr0); | 26 | mtspr(SPRN_MMCR0, mmcr0); |
27 | } | 27 | } |
28 | 28 | ||
29 | static spinlock_t pmc_owner_lock = SPIN_LOCK_UNLOCKED; | 29 | static DEFINE_SPINLOCK(pmc_owner_lock); |
30 | static void *pmc_owner_caller; /* mostly for debugging */ | 30 | static void *pmc_owner_caller; /* mostly for debugging */ |
31 | perf_irq_t perf_irq = dummy_perf; | 31 | perf_irq_t perf_irq = dummy_perf; |
32 | 32 | ||
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 19724c5800a7..2e64e8c3e8e5 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -20,7 +20,7 @@ spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = { | |||
20 | 20 | ||
21 | #else /* SMP */ | 21 | #else /* SMP */ |
22 | 22 | ||
23 | static spinlock_t dummy = SPIN_LOCK_UNLOCKED; | 23 | static DEFINE_SPINLOCK(dummy); |
24 | #define ATOMIC_HASH_SIZE 1 | 24 | #define ATOMIC_HASH_SIZE 1 |
25 | #define ATOMIC_HASH(a) (&dummy) | 25 | #define ATOMIC_HASH(a) (&dummy) |
26 | 26 | ||
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 7c9dbc8c9423..25c9a99c377b 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -94,7 +94,7 @@ static char mv643xx_driver_version[] = "1.0"; | |||
94 | static void __iomem *mv643xx_eth_shared_base; | 94 | static void __iomem *mv643xx_eth_shared_base; |
95 | 95 | ||
96 | /* used to protect MV643XX_ETH_SMI_REG, which is shared across ports */ | 96 | /* used to protect MV643XX_ETH_SMI_REG, which is shared across ports */ |
97 | static spinlock_t mv643xx_eth_phy_lock = SPIN_LOCK_UNLOCKED; | 97 | static DEFINE_SPINLOCK(mv643xx_eth_phy_lock); |
98 | 98 | ||
99 | static inline u32 mv_read(int offset) | 99 | static inline u32 mv_read(int offset) |
100 | { | 100 | { |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 91df0bf181dd..7a57c1b8373f 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -215,7 +215,7 @@ static inline void iosapic_write(void __iomem *iosapic, unsigned int reg, u32 va | |||
215 | #define IOSAPIC_IRDT_ID_EID_SHIFT 0x10 | 215 | #define IOSAPIC_IRDT_ID_EID_SHIFT 0x10 |
216 | 216 | ||
217 | 217 | ||
218 | static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED; | 218 | static DEFINE_SPINLOCK(iosapic_lock); |
219 | 219 | ||
220 | static inline void iosapic_eoi(void __iomem *addr, unsigned int data) | 220 | static inline void iosapic_eoi(void __iomem *addr, unsigned int data) |
221 | { | 221 | { |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index bd0e1b6be1ea..13ecd0c47404 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -116,7 +116,7 @@ typedef struct { | |||
116 | } scsi_changer; | 116 | } scsi_changer; |
117 | 117 | ||
118 | static LIST_HEAD(ch_devlist); | 118 | static LIST_HEAD(ch_devlist); |
119 | static spinlock_t ch_devlist_lock = SPIN_LOCK_UNLOCKED; | 119 | static DEFINE_SPINLOCK(ch_devlist_lock); |
120 | static int ch_devcount; | 120 | static int ch_devcount; |
121 | 121 | ||
122 | static struct scsi_driver ch_template = | 122 | static struct scsi_driver ch_template = |
diff --git a/drivers/video/geode/display_gx1.c b/drivers/video/geode/display_gx1.c index f4983879fcc4..926d53eeb549 100644 --- a/drivers/video/geode/display_gx1.c +++ b/drivers/video/geode/display_gx1.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "geodefb.h" | 22 | #include "geodefb.h" |
23 | #include "display_gx1.h" | 23 | #include "display_gx1.h" |
24 | 24 | ||
25 | static spinlock_t gx1_conf_reg_lock = SPIN_LOCK_UNLOCKED; | 25 | static DEFINE_SPINLOCK(gx1_conf_reg_lock); |
26 | 26 | ||
27 | static u8 gx1_read_conf_reg(u8 reg) | 27 | static u8 gx1_read_conf_reg(u8 reg) |
28 | { | 28 | { |
diff --git a/fs/xfs/support/ktrace.c b/fs/xfs/support/ktrace.c index 3dae14c8c55a..fa8394f9437d 100644 --- a/fs/xfs/support/ktrace.c +++ b/fs/xfs/support/ktrace.c | |||
@@ -170,7 +170,7 @@ ktrace_enter( | |||
170 | void *val14, | 170 | void *val14, |
171 | void *val15) | 171 | void *val15) |
172 | { | 172 | { |
173 | static lock_t wrap_lock = SPIN_LOCK_UNLOCKED; | 173 | static DEFINE_SPINLOCK(wrap_lock); |
174 | unsigned long flags; | 174 | unsigned long flags; |
175 | int index; | 175 | int index; |
176 | ktrace_entry_t *ktep; | 176 | ktrace_entry_t *ktep; |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index a1a9a7abff50..5265dfd69928 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -645,10 +645,10 @@ int netpoll_setup(struct netpoll *np) | |||
645 | 645 | ||
646 | npinfo->rx_flags = 0; | 646 | npinfo->rx_flags = 0; |
647 | npinfo->rx_np = NULL; | 647 | npinfo->rx_np = NULL; |
648 | npinfo->poll_lock = SPIN_LOCK_UNLOCKED; | 648 | spin_lock_init(&npinfo->poll_lock); |
649 | npinfo->poll_owner = -1; | 649 | npinfo->poll_owner = -1; |
650 | npinfo->tries = MAX_RETRIES; | 650 | npinfo->tries = MAX_RETRIES; |
651 | npinfo->rx_lock = SPIN_LOCK_UNLOCKED; | 651 | spin_lock_init(&npinfo->rx_lock); |
652 | } else | 652 | } else |
653 | npinfo = ndev->npinfo; | 653 | npinfo = ndev->npinfo; |
654 | 654 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 8eb083b6041a..b3ad49fa7d78 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -503,7 +503,7 @@ static int pg_delay_d = 0; | |||
503 | static int pg_clone_skb_d = 0; | 503 | static int pg_clone_skb_d = 0; |
504 | static int debug = 0; | 504 | static int debug = 0; |
505 | 505 | ||
506 | static spinlock_t _thread_lock = SPIN_LOCK_UNLOCKED; | 506 | static DEFINE_SPINLOCK(_thread_lock); |
507 | static struct pktgen_thread *pktgen_threads = NULL; | 507 | static struct pktgen_thread *pktgen_threads = NULL; |
508 | 508 | ||
509 | static char module_fname[128]; | 509 | static char module_fname[128]; |