From: David Schleef Date: Sun, 15 Oct 2000 21:31:39 +0000 (+0000) Subject: mite->used fix, 6034e fix from Brad Keryan X-Git-Tag: r0_7_51~51 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83753d8f484dcdeeaab512891abce60776f8e2a4;p=comedi.git mite->used fix, 6034e fix from Brad Keryan --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 7541f2cf..41a390fe 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -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"); diff --git a/comedi/drivers/ni_pcidio.c b/comedi/drivers/ni_pcidio.c index f23ab0ac..abefd503 100644 --- a/comedi/drivers/ni_pcidio.c +++ b/comedi/drivers/ni_pcidio.c @@ -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;iboard=i; diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index f97fb537..1e2750f5 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -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;iboard=i;