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)
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 */
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 {
#include <asm/uaccess.h>
-static spinlock_t elv_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(elv_list_lock);
static LIST_HEAD(elv_list);
/*
* 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;
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)
{
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)
{
* 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)
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)
{
#include <linux/sched.h>
#include <linux/workqueue.h>
-static spinlock_t pd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pd_lock);
#ifndef MODULE
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);
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;
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 */
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)
*/
#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.
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
0xE0000
};
-static spinlock_t xd_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(xd_lock);
static struct gendisk *xd_gendisk[2];
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;