}nidio96_private;
#define devpriv ((nidio96_private *)dev->private)
-static int nidio_find_device(comedi_device *dev,comedi_devconfig *it);
+static int nidio_find_device(comedi_device *dev,int bus,int slot);
#if 0
static int setup_mite(comedi_device *dev);
#endif
if((ret=alloc_private(dev,sizeof(nidio96_private)))<0)
return ret;
- ret=nidio_find_device(dev,it);
+ ret=nidio_find_device(dev,it->options[0],it->options[1]);
if(ret<0)return ret;
dev->iobase=mite_setup(devpriv->mite);
}
-static int nidio_find_device(comedi_device *dev,comedi_devconfig *it)
+static int nidio_find_device(comedi_device *dev,int bus,int slot)
{
struct mite_struct *mite;
int i;
for(mite=mite_devices;mite;mite=mite->next){
if(mite->used)continue;
+ if(bus || slot){
+#ifdef PCI_SUPPORT_VER1
+ if(bus!=(mite->pci_bus<<8) ||
+ slot!=PCI_SLOT(mite->pci_device_fn))
+ continue;
+#else
+ if(bus!=(mite->pcidev->bus->number<<8) ||
+ slot!=PCI_SLOT(mite->pcidev->devfn))
+ continue;
+#endif
+ }
for(i=0;i<n_nidio_boards;i++){
if(mite_device_id(mite)==nidio_boards[i].dev_id){
dev->board=i;
ao_fifo_depth: 2048,
caldac: type4, /* XXX */
},
- { device_id: 0x0000, /* unknown */
+ { device_id: 0x14f0, /* unknown */
name: "pci-6111e",
n_adchan: 2,
adbits: 12,
#include "ni_mio_common.c"
-static int pcimio_find_device(comedi_device *dev);
+static int pcimio_find_device(comedi_device *dev,int bus,int slot);
/* cleans up allocated resources */
ret=alloc_private(dev,sizeof(ni_private));
if(ret<0)return ret;
- ret=pcimio_find_device(dev);
+ ret=pcimio_find_device(dev,it->options[0],it->options[1]);
if(ret<0)return ret;
printk(" %s",ni_boards[dev->board].name);
}
-static int pcimio_find_device(comedi_device *dev)
+static int pcimio_find_device(comedi_device *dev,int bus,int slot)
{
struct mite_struct *mite;
int i;
for(mite=mite_devices;mite;mite=mite->next){
if(mite->used)continue;
+ if(bus || slot){
+#ifdef PCI_SUPPORT_VER1
+ if(bus!=mite->pci_bus ||
+ slot!=PCI_SLOT(mite->pci_device_fn))
+ continue;
+#else
+ if(bus!=mite->pcidev->bus->number<<8 ||
+ slot!=PCI_SLOT(mite->pcidev->devfn))
+ continue;
+#endif
+ }
+
for(i=0;i<n_pcimio_boards;i++){
if(mite_device_id(mite)==ni_boards[i].device_id){
dev->board=i;