Static initialization of spinlocks has been deprecated by the kernel
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 21 Nov 2005 00:11:58 +0000 (00:11 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 21 Nov 2005 00:11:58 +0000 (00:11 +0000)
(from anders.blomdell@control.lth.se (Anders Blomdell)).

comedi/comedi_fops.c

index 1c88bd143be4da6becd5592659586f6c84f3987b..272f7f3e704313b3093b046730aa7d0851011b31 100644 (file)
@@ -58,7 +58,7 @@ MODULE_PARM(comedi_debug, "i");
 #endif
 
 comedi_device *comedi_devices;
-spinlock_t big_comedi_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t big_comedi_lock; /* Dynamic initialization */
 
 static int do_devconfig_ioctl(comedi_device *dev,comedi_devconfig *arg,unsigned int minor);
 static int do_bufconfig_ioctl(comedi_device *dev,void *arg);
@@ -1707,6 +1707,7 @@ static int __init comedi_init(void)
        int i;
 
        printk("comedi: version " COMEDI_RELEASE " - David Schleef <ds@schleef.org>\n");
+       spin_lock_init(&big_comedi_lock);
        if(devfs_register_chrdev(COMEDI_MAJOR,"comedi",&comedi_fops)){
                printk("comedi: unable to get major %d\n",COMEDI_MAJOR);
                return -EIO;