From: Alexey Dobriyan Date: Mon, 23 Apr 2007 21:41:07 +0000 (-0700) Subject: paride drivers: initialize spinlocks X-Git-Tag: v2.6.21~24 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=671d40f4aa20d31121695e33393c9bd87053f4fa;p=linux-2.6-omap-h63xx.git 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. Signed-off-by: Alexey Dobriyan Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index c852eed91e4..1eeb8f2cde7 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -140,7 +140,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY}; #include #include -static spinlock_t pcd_lock; +static DEFINE_SPINLOCK(pcd_lock); module_param(verbose, bool, 0644); module_param(major, int, 0); diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 7cdaa195126..5826508f673 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -154,7 +154,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_LUN, D_DLY}; #include #include -static spinlock_t pf_spin_lock; +static DEFINE_SPINLOCK(pf_spin_lock); module_param(verbose, bool, 0644); module_param(major, int, 0);