Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:18:03 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:18:03 -0800
commita2fea16f663ddc54d4a412cbef62560ec7f126e5 (patch)
treecbf42a99e1d8e95c40383880c8ce7a3cfd7a5992
parentf8ac5fa65c861c078a324d5d3e386400ea0973c1 (diff)
[PATCH] Lock initializer cleanup: Block devices
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/block/acsi.c2
-rw-r--r--drivers/block/amiflop.c2
-rw-r--r--drivers/block/ataflop.c2
-rw-r--r--drivers/block/elevator.c2
-rw-r--r--drivers/block/floppy.c6
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/block/paride/paride.c2
-rw-r--r--drivers/block/paride/pd.c2
-rw-r--r--drivers/block/paride/pseudo.h2
-rw-r--r--drivers/block/ps2esdi.c2
-rw-r--r--drivers/block/swim3.c2
-rw-r--r--drivers/block/swim_iop.c2
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/viodasd.c2
-rw-r--r--drivers/block/xd.c2
-rw-r--r--drivers/block/z2ram.c2
16 files changed, 18 insertions, 18 deletions
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c
index a2caf824bb2e..ce933de48084 100644
--- a/drivers/block/acsi.c
+++ b/drivers/block/acsi.c
@@ -250,7 +250,7 @@ static int CurrentNReq;
static int CurrentNSect;
static char *CurrentBuffer;
-static spinlock_t acsi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(acsi_lock);
#define SET_TIMER() mod_timer(&acsi_timer, jiffies + ACSI_TIMEOUT)
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 19ca2e57e9af..1468e8cf712d 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -163,7 +163,7 @@ static int writepending;
static int writefromint;
static char *raw_buf;
-static spinlock_t amiflop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(amiflop_lock);
#define RAW_BUF_SIZE 30000 /* size of raw disk data */
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index c5385258da88..db05a5a99f35 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -140,7 +140,7 @@ static int StartDiskType[] = {
static int DriveType = TYPE_HD;
-static spinlock_t ataflop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ataflop_lock);
/* Array for translating minors into disk formats */
static struct {
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 0bf9458f911d..35f4079b04d6 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -37,7 +37,7 @@
#include <asm/uaccess.h>
-static spinlock_t elv_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(elv_list_lock);
static LIST_HEAD(elv_list);
/*
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index b080ad722d20..bce3fc0e6e4f 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -216,7 +216,7 @@ static int use_virtual_dma;
* record each buffers capabilities
*/
-static spinlock_t floppy_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_lock);
static struct completion device_release;
static unsigned short virtual_dma_port = 0x3f0;
@@ -1072,7 +1072,7 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
return 0;
}
-static spinlock_t floppy_hlt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_hlt_lock);
static int hlt_disabled;
static void floppy_disable_hlt(void)
{
@@ -4415,7 +4415,7 @@ out_put_disk:
return err;
}
-static spinlock_t floppy_usage_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(floppy_usage_lock);
static int floppy_grab_irq_and_dma(void)
{
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 775b8ae21ccd..2f5cc3e251c6 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -92,7 +92,7 @@ static struct nbd_device nbd_dev[MAX_NBD];
* a single lock.
* Thanks go to Jens Axboe and Al Viro for their LKML emails explaining this!
*/
-static spinlock_t nbd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nbd_lock);
#ifndef NDEBUG
static const char *ioctl_cmd_to_ascii(int cmd)
diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c
index 8d29459a1434..1fef136c0e41 100644
--- a/drivers/block/paride/paride.c
+++ b/drivers/block/paride/paride.c
@@ -46,7 +46,7 @@ MODULE_LICENSE("GPL");
static struct pi_protocol *protocols[MAX_PROTOS];
-static spinlock_t pi_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pi_spinlock);
void pi_write_regr(PIA * pi, int cont, int regr, int val)
{
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index c4c8f0df59ee..4390587b3413 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -155,7 +155,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV};
#include <linux/sched.h>
#include <linux/workqueue.h>
-static spinlock_t pd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pd_lock);
#ifndef MODULE
diff --git a/drivers/block/paride/pseudo.h b/drivers/block/paride/pseudo.h
index d9818ec320e6..932342d7a8eb 100644
--- a/drivers/block/paride/pseudo.h
+++ b/drivers/block/paride/pseudo.h
@@ -43,7 +43,7 @@ static unsigned long ps_timeout;
static int ps_tq_active = 0;
static int ps_nice = 0;
-static spinlock_t ps_spinlock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ps_spinlock __attribute__((unused)));
static DECLARE_WORK(ps_tq, ps_tq_int, NULL);
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
index 84f4e62765e4..29548784cb7b 100644
--- a/drivers/block/ps2esdi.c
+++ b/drivers/block/ps2esdi.c
@@ -108,7 +108,7 @@ static int intg_esdi = 0; /* If integrated adapter */
struct ps2esdi_i_struct {
unsigned int head, sect, cyl, wpcom, lzone, ctl;
};
-static spinlock_t ps2esdi_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ps2esdi_lock);
static struct request_queue *ps2esdi_queue;
static struct request *current_req;
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 375bf724333c..5b09cf154ac7 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -206,7 +206,7 @@ struct floppy_state {
static struct floppy_state floppy_states[MAX_FLOPPIES];
static int floppy_count = 0;
-static spinlock_t swim3_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(swim3_lock);
static unsigned short write_preamble[] = {
0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, 0x4e4e, /* gap field */
diff --git a/drivers/block/swim_iop.c b/drivers/block/swim_iop.c
index 283c5b6bcf3e..a1283f6dc018 100644
--- a/drivers/block/swim_iop.c
+++ b/drivers/block/swim_iop.c
@@ -76,7 +76,7 @@ static struct swim_iop_req *current_req;
static int floppy_count;
static struct floppy_state floppy_states[MAX_FLOPPIES];
-static spinlock_t swim_iop_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(swim_iop_lock);
#define CURRENT elv_next_request(swim_queue)
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 4ca684455300..84991b28a9bc 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -336,7 +336,7 @@ MODULE_DEVICE_TABLE(usb, ub_usb_ids);
*/
#define UB_MAX_HOSTS 26
static char ub_hostv[UB_MAX_HOSTS];
-static spinlock_t ub_lock = SPIN_LOCK_UNLOCKED; /* Locks globals and ->openc */
+static DEFINE_SPINLOCK(ub_lock); /* Locks globals and ->openc */
/*
* The SCSI command tracing procedures.
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index 321d53dfe159..fbc95a96f6e2 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -72,7 +72,7 @@ enum {
MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name)
};
-static spinlock_t viodasd_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(viodasd_spinlock);
#define VIOMAXREQ 16
#define VIOMAXBLOCKDMA 12
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 2fa910e06425..3fbadc82ad43 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -123,7 +123,7 @@ static unsigned int xd_bases[] __initdata =
0xE0000
};
-static spinlock_t xd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(xd_lock);
static struct gendisk *xd_gendisk[2];
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 8dc889498306..007f6a662439 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -65,7 +65,7 @@ static int chip_count = 0;
static int list_count = 0;
static int current_device = -1;
-static spinlock_t z2ram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(z2ram_lock);
static struct block_device_operations z2_fops;
static struct gendisk *z2ram_gendisk;