]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
paride drivers: initialize spinlocks
authorAlexey Dobriyan <adobriyan@sw.ru>
Mon, 23 Apr 2007 21:41:07 +0000 (14:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 24 Apr 2007 15:23:08 +0000 (08:23 -0700)
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.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/paride/pcd.c
drivers/block/paride/pf.c

index c852eed91e4b6d82cdea3950271abc17e7f4762d..1eeb8f2cde71e1b05cc988e4a728dbf99e5ef618 100644 (file)
@@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
 #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);
index 7cdaa19512605d7cc28356d41132426ca0953630..5826508f6731772e8260e8edf8809dab6a11ce4a 100644 (file)
@@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY};
 #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);