return IRQ_RETVAL(1);
}
-static int i_ADDI_Reset(struct comedi_device *dev)
-{
- const struct addi_board *this_board = dev->board_ptr;
-
- this_board->reset(dev);
- return 0;
-}
-
static int addi_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{
s->type = COMEDI_SUBD_UNUSED;
}
- i_ADDI_Reset(dev);
return 0;
}
.ui_MinAcquisitiontimeNs = 10000,
.ui_MinDelaytimeNs = 100000,
.interrupt = apci035_interrupt,
- .reset = apci035_reset,
.ai_config = apci035_ai_config,
.ai_read = apci035_ai_read,
.timer_config = apci035_timer_config,
static int apci035_auto_attach(struct comedi_device *dev,
unsigned long context)
{
+ int ret;
+
dev->board_ptr = &apci035_boardtypes[0];
- return addi_auto_attach(dev, context);
+ ret = addi_auto_attach(dev, context);
+ if (ret)
+ return ret;
+
+ apci035_reset(dev);
+
+ return 0;
}
static void apci035_detach(struct comedi_device *dev)
{
if (dev->iobase)
- i_ADDI_Reset(dev);
+ apci035_reset(dev);
comedi_pci_detach(dev);
}
.i_DoMaxdata = 0xffff,
.i_Timer = 1,
.interrupt = apci1500_interrupt,
- .reset = apci1500_reset,
.di_config = apci1500_di_config,
.di_read = apci1500_di_read,
.di_write = apci1500_di_write,
static int apci1500_auto_attach(struct comedi_device *dev,
unsigned long context)
{
+ int ret;
+
dev->board_ptr = &apci1500_boardtypes[0];
- return addi_auto_attach(dev, context);
+ ret = addi_auto_attach(dev, context);
+ if (ret)
+ return ret;
+
+ apci1500_reset(dev);
+
+ return 0;
}
static void apci1500_detach(struct comedi_device *dev)
{
if (dev->iobase)
- i_ADDI_Reset(dev);
+ apci1500_reset(dev);
comedi_pci_detach(dev);
}