comedi_subdevice *s,
comedi_cmd *cmd);
-static void me4000_ai_isr(
+static irqreturn_t me4000_ai_isr(
int irq,
void *dev_id,
struct pt_regs *regs);
* convenient macro defined in comedidev.h. It relies on
* n_subdevices being set correctly.
*/
- dev->n_subdevices = 4;
- if(alloc_subdevices(dev) < 0)
+ if(alloc_subdevices(dev, 4) < 0)
return -ENOMEM;
/*=========================================================================
CALL_PDEBUG("In init_board_info()\n");
/* Init spin locks */
- spin_lock_init(&info->preload_lock);
- spin_lock_init(&info->ai_ctrl_lock);
+ //spin_lock_init(&info->preload_lock);
+ //spin_lock_init(&info->ai_ctrl_lock);
/* Get the serial number */
result = pci_read_config_dword(pci_dev_p, 0x2C, &info->serial_no);
CALL_PDEBUG("In init_ao_context()\n");
for(i = 0; i < thisboard->ao.count; i++){
- spin_lock_init(&info->ao_context.use_lock);
+ //spin_lock_init(&info->ao_context[i].use_lock);
info->ao_context[i].irq = info->irq;
switch(i){
-static void me4000_ai_isr(int irq, void *dev_id, struct pt_regs *regs){
+static irqreturn_t me4000_ai_isr(int irq, void *dev_id, struct pt_regs *regs){
unsigned int tmp;
comedi_device *dev = dev_id;
comedi_subdevice *s = dev->subdevices;
/* Check if irq number is right */
if(irq != ai_context->irq){
printk(KERN_ERR"comedi%d: me4000: me4000_ai_isr(): Incorrect interrupt num: %d\n", dev->minor, irq);
- return;
+ return IRQ_HANDLED;
}
if(me4000_inl(dev, ai_context->irq_status_reg) & ME4000_IRQ_STATUS_BIT_AI_HF){
if(s->async->events)
comedi_event(dev, s, s->async->events);
- return;
+ return IRQ_HANDLED;
}