Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:18:51 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:18:51 -0800
commitb8207c12a4480fa503f1bc1c75466e188a406290 (patch)
treee88967edfaab89fe92de2306b816952331e9c67a
parent243bb4dd73d6f606b7c960755d6e180fd4745649 (diff)
[PATCH] Lock initializer cleanup: SCSI
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/scsi/aha1542.c2
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/eata.c2
-rw-r--r--drivers/scsi/esp.c2
-rw-r--r--drivers/scsi/imm.c2
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/ppa.c2
-rw-r--r--drivers/scsi/qlogicpti.c2
-rw-r--r--drivers/scsi/scsi.c2
-rw-r--r--drivers/scsi/scsi_debug.c6
-rw-r--r--drivers/scsi/sd.c2
-rw-r--r--drivers/scsi/sg.c2
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--drivers/scsi/sym53c416.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c2
-rw-r--r--drivers/scsi/sym53c8xx_comm.h2
-rw-r--r--drivers/scsi/u14-34f.c2
19 files changed, 21 insertions, 21 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 4c27a01bf1c0..e9920a009593 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -167,7 +167,7 @@ struct aha1542_hostdata {
static struct Scsi_Host *aha_host[7]; /* One for each IRQ level (9-15) */
-static spinlock_t aha1542_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(aha1542_lock);
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 9e4c2451b04f..2a18c4a0d14c 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -145,7 +145,7 @@ struct adpt_i2o_post_wait_data
static struct adpt_i2o_post_wait_data *adpt_post_wait_queue = NULL;
static u32 adpt_post_wait_id = 0;
-static spinlock_t adpt_post_wait_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(adpt_post_wait_lock);
/*============================================================================
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index df2f6d4ee204..81d16cfbe69e 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -839,7 +839,7 @@ struct hostdata {
static struct Scsi_Host *sh[MAX_BOARDS];
static const char *driver_name = "EATA";
static char sha[MAX_BOARDS];
-static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(driver_lock);
/* Initialize num_boards so that ihdlr can work while detect is in progress */
static unsigned int num_boards = MAX_BOARDS;
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c
index 782c31becb3a..d8ab73b68031 100644
--- a/drivers/scsi/esp.c
+++ b/drivers/scsi/esp.c
@@ -185,7 +185,7 @@ enum {
/* The master ring of all esp hosts we are managing in this driver. */
static struct esp *espchain;
-static spinlock_t espchain_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(espchain_lock);
static int esps_running = 0;
/* Forward declarations. */
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 1a5c910429c8..be7f2ca0183f 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -60,7 +60,7 @@ static inline imm_struct *imm_dev(struct Scsi_Host *host)
return *(imm_struct **)&host->hostdata;
}
-static spinlock_t arbitration_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(arbitration_lock);
static void got_it(imm_struct *dev)
{
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index f0059b1f7a01..9b684f9870fd 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -89,7 +89,7 @@ static struct list_head ipr_ioa_head = LIST_HEAD_INIT(ipr_ioa_head);
static unsigned int ipr_log_level = IPR_DEFAULT_LOG_LEVEL;
static unsigned int ipr_max_speed = 1;
static int ipr_testmode = 0;
-static spinlock_t ipr_driver_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ipr_driver_lock);
/* This table describes the differences between DMA controller chips */
static const struct ipr_chip_cfg_t ipr_chip_cfg[] = {
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 4aff0d68298d..60decb2a7244 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -150,7 +150,7 @@ static int osst_max_dev = OSST_MAX_TAPES;
static int osst_nr_dev;
static struct osst_tape **os_scsi_tapes = NULL;
-static rwlock_t os_scsi_tapes_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(os_scsi_tapes_lock);
static int modes_defined = FALSE;
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 6733e223adfc..96b4522523d9 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -49,7 +49,7 @@ static inline ppa_struct *ppa_dev(struct Scsi_Host *host)
return *(ppa_struct **)&host->hostdata;
}
-static spinlock_t arbitration_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(arbitration_lock);
static void got_it(ppa_struct *dev)
{
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 91aaf50c7567..a917ab7475ac 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -56,7 +56,7 @@
#include "qlogicpti_asm.c"
static struct qlogicpti *qptichain = NULL;
-static spinlock_t qptichain_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(qptichain_lock);
static int qptis_running = 0;
#define PACKB(a, b) (((a)<<4)|(b))
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 63e5224eee0a..ab4c237306e4 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -925,7 +925,7 @@ EXPORT_SYMBOL(scsi_finish_command);
*/
void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
{
- static spinlock_t device_request_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(device_request_lock);
unsigned long flags;
/*
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 609b1676c21e..7c6fafc5c48a 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -169,7 +169,7 @@ struct sdebug_host_info {
container_of(d, struct sdebug_host_info, dev)
static LIST_HEAD(sdebug_host_list);
-static spinlock_t sdebug_host_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sdebug_host_list_lock);
typedef void (* done_funct_t) (struct scsi_cmnd *);
@@ -213,8 +213,8 @@ static int num_dev_resets = 0;
static int num_bus_resets = 0;
static int num_host_resets = 0;
-static spinlock_t queued_arr_lock = SPIN_LOCK_UNLOCKED;
-static rwlock_t atomic_rw = RW_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(queued_arr_lock);
+static DEFINE_RWLOCK(atomic_rw);
static char sdebug_proc_name[] = "scsi_debug";
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 86ee1e143580..252018b1c6a9 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -105,7 +105,7 @@ struct scsi_disk {
};
static DEFINE_IDR(sd_index_idr);
-static spinlock_t sd_index_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sd_index_lock);
/* This semaphore is used to mediate the 0->1 reference get in the
* face of object destruction (i.e. we can't allow a get on an
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 7fb610d888cb..cf971befa9cb 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -108,7 +108,7 @@ static void sg_remove(struct class_device *);
static Scsi_Request *dummy_cmdp; /* only used for sizeof */
-static rwlock_t sg_dev_arr_lock = RW_LOCK_UNLOCKED; /* Also used to lock
+static DEFINE_RWLOCK(sg_dev_arr_lock); /* Also used to lock
file descriptor list for device */
static struct class_interface sg_interface = {
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 21cfabb7783b..a228c532684a 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -85,7 +85,7 @@ static struct scsi_driver sr_template = {
};
static unsigned long sr_index_bits[SR_DISKS / BITS_PER_LONG];
-static spinlock_t sr_index_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sr_index_lock);
/* This semaphore is used to mediate the 0->1 reference get in the
* face of object destruction (i.e. we can't allow a get on an
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 64a9b4c623cc..4388fc8c396c 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -167,7 +167,7 @@ DEB( static int debugging = DEBUG; )
24 bits) */
#define SET_DENS_AND_BLK 0x10001
-static rwlock_t st_dev_arr_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(st_dev_arr_lock);
static int st_fixed_buffer_size = ST_FIXED_BUFFER_SIZE;
static int st_max_sg_segs = ST_MAX_SG;
diff --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
index f43ebddf489e..fbfc0c06d409 100644
--- a/drivers/scsi/sym53c416.c
+++ b/drivers/scsi/sym53c416.c
@@ -239,7 +239,7 @@ static void sym53c416_set_transfer_counter(int base, unsigned int len)
outb((len & 0xFF0000) >> 16, base + TC_HIGH);
}
-static spinlock_t sym53c416_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sym53c416_lock);
/* Returns the number of bytes read */
static __inline__ unsigned int sym53c416_read(int base, unsigned char *buffer, unsigned int len)
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index c389e55c3204..3ed36af0c893 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -156,7 +156,7 @@ pci_get_base_address(struct pci_dev *pdev, int index, u_long *base)
}
/* This lock protects only the memory allocation/free. */
-static spinlock_t sym53c8xx_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sym53c8xx_lock);
static struct scsi_transport_template *sym2_transport_template = NULL;
diff --git a/drivers/scsi/sym53c8xx_comm.h b/drivers/scsi/sym53c8xx_comm.h
index 04ebe5486d5b..20ae2b17df58 100644
--- a/drivers/scsi/sym53c8xx_comm.h
+++ b/drivers/scsi/sym53c8xx_comm.h
@@ -250,7 +250,7 @@ static void ___m_free(m_pool_s *mp, void *ptr, int size)
}
}
-static spinlock_t ncr53c8xx_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ncr53c8xx_lock);
static void *__m_calloc2(m_pool_s *mp, int size, char *name, int uflags)
{
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
index 2889f402de2e..dca215411f68 100644
--- a/drivers/scsi/u14-34f.c
+++ b/drivers/scsi/u14-34f.c
@@ -612,7 +612,7 @@ struct hostdata {
static struct Scsi_Host *sh[MAX_BOARDS + 1];
static const char *driver_name = "Ux4F";
static char sha[MAX_BOARDS];
-static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(driver_lock);
/* Initialize num_boards so that ihdlr can work while detect is in progress */
static unsigned int num_boards = MAX_BOARDS;