Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:16:05 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:16:05 -0800
commitbbe9df084798e180c41bde3f5ae5cd4e6b7eff52 (patch)
treed244639602edfe82e63635f0e6e92fd20c839836
parent98926f81d52a898c2385d6f5b884fa666cb0879e (diff)
[PATCH] Lock initializer cleanup: IDE
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--drivers/ide/ide.c6
-rw-r--r--drivers/ide/legacy/hd.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index e96ae74bcb97..474c41494c49 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -175,7 +175,7 @@ static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */
static int initializing; /* set while initializing built-in drivers */
DECLARE_MUTEX(ide_cfg_sem);
-spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+ __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
#ifdef CONFIG_BLK_DEV_IDEPCI
static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
@@ -368,8 +368,8 @@ static int ide_open (struct inode * inode, struct file * filp)
* list of drivers. Currently nobody takes both at once.
*/
-static spinlock_t drives_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t drivers_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(drives_lock);
+static DEFINE_SPINLOCK(drivers_lock);
static LIST_HEAD(drivers);
/* Iterator for the driver list. */
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index 67d54d787aca..c4090550ec13 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -94,7 +94,7 @@
#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */
#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */
-static spinlock_t hd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hd_lock);
static struct request_queue *hd_queue;
#define MAJOR_NR HD_MAJOR