Skip to contentSkip to conversation

paride drivers: initialize spinlocks

PATCH New Alexey Dobriyan 1 participant 1 message Apr 16, 2007 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 paride drivers: initialize spinlocks

pcd_lock and pf_spin_lock are passed to blk_init_queue() which, seeing them as valid lock pointer, sets it as ->queue_lock.

The problem is that pcd_lock and pf_spin_lock aren't initialized anywhere.

---

 drivers/block/paride/pcd.c |    2 +-
 drivers/block/paride/pf.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/paride/pcd.c +1 -1
@@ -140,7 +140,7 @@ #include <linux/spinlock.h>
 #include <linux/blkdev.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pcd_lock;
+static DEFINE_SPINLOCK(pcd_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);
drivers/block/paride/pf.c +1 -1
@@ -154,7 +154,7 @@ #include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <asm/uaccess.h>
 
-static spinlock_t pf_spin_lock;
+static DEFINE_SPINLOCK(pf_spin_lock);
 
 module_param(verbose, bool, 0644);
 module_param(major, int, 0);