mite->used fix, 6034e fix from Brad Keryan <brad.keryan@ni.com>
authorDavid Schleef <ds@schleef.org>
Sun, 15 Oct 2000 21:31:39 +0000 (21:31 +0000)
committerDavid Schleef <ds@schleef.org>
Sun, 15 Oct 2000 21:31:39 +0000 (21:31 +0000)
comedi/drivers/mite.c
comedi/drivers/ni_pcidio.c
comedi/drivers/ni_pcimio.c

index 7541f2cfe708790cb6968645f4cb9dbc3e2af731..41a390fe435f68114a43ac2356caf321b281211e 100644 (file)
@@ -209,6 +209,8 @@ int mite_setup(struct mite_struct *mite)
        mite->ring[i].next=0;
        mite->ring[i].unused=0x1c; /* eh? */
 
+       mite->used = 1;
+
        return (int) mite->daq_io_addr;
 }
 
@@ -235,6 +237,8 @@ void mite_unsetup(struct mite_struct *mite)
                iounmap(mite->daq_io_addr);
                mite->daq_io_addr=NULL;
        }
+
+       mite->used = 0;
 }
 
 
@@ -246,6 +250,7 @@ void mite_list_devices(void)
        for(mite=mite_devices;mite;mite=next){
                next=mite->next;
                printk(" 0x%04x",mite_device_id(mite));
+               if(mite->used)printk("(used)");
        }
        printk("\n");
 
index f23ab0ac4c39fca5ffad66492b37de0956dc4787..abefd50391ae1e7907927114dab3ff67bc0904c5 100644 (file)
@@ -448,6 +448,7 @@ static int nidio_find_device(comedi_device *dev,comedi_devconfig *it)
        int i;
        
        for(mite=mite_devices;mite;mite=mite->next){
+               if(mite->used)continue;
                for(i=0;i<n_nidio_boards;i++){
                        if(mite_device_id(mite)==nidio_boards[i].dev_id){
                                dev->board=i;
index f97fb537fc5d2167a55260f1ca95534e0f0ea94e..1e2750f5f60a50454a528ae8a9461b129d6678eb 100644 (file)
@@ -260,7 +260,7 @@ static ni_board ni_boards[]={
                adbits:         16,
                ai_fifo_depth:  512,
                alwaysdither:   1,
-               gainlkup:       ai_gain_8_602x, // XXX check
+               gainlkup:       ai_gain_4_603x,
                ai_speed:       5000,
                n_aochan:       0,
                aobits:         0,
@@ -481,6 +481,7 @@ static int pcimio_find_device(comedi_device *dev)
        int i;
 
        for(mite=mite_devices;mite;mite=mite->next){
+               if(mite->used)continue;
                for(i=0;i<n_pcimio_boards;i++){
                        if(mite_device_id(mite)==ni_boards[i].device_id){
                                dev->board=i;