dev->minor fix, a minor bugfix
authorDavid Schleef <ds@schleef.org>
Wed, 24 May 2000 21:43:07 +0000 (21:43 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 24 May 2000 21:43:07 +0000 (21:43 +0000)
comedi/comedi_fops.c

index 6cc194d6d5c24bf179a71d2bdbdca2c6f867c036..9fd2e3d8a72ef3ee18ca54a5059345b51c2c3739 100644 (file)
@@ -1388,6 +1388,8 @@ void init_drivers(void);
 
 int init_module(void)
 {
+       int i;
+
        printk("comedi: version " COMEDI_VERSION " - David Schleef <ds@stm.lbl.gov>\n");
        if(register_chrdev(COMEDI_MAJOR,"comedi",&comedi_fops)){
                printk("comedi: unable to get major %d\n",COMEDI_MAJOR);
@@ -1397,6 +1399,9 @@ int init_module(void)
        if(!comedi_devices)
                return -ENOMEM;
        memset(comedi_devices,0,sizeof(comedi_device)*COMEDI_NDEVICES);
+       for(i=0;i<COMEDI_NDEVICES;i++){
+               comedi_devices[i].minor=i;
+       }
 #if 0
        init_polling();
 #endif