need to slow down DAC loading. I don't trust NI's claim that
two writes to the PCI bus slows IO enough. I would prefer to
- use comedi_udelay(). Timing specs: (clock)
+ use udelay(). Timing specs: (clock)
AD8522 30ns
DAC8043 120ns
DAC8800 60ns
{
unsigned long flags;
- comedi_spin_lock_irqsave(&devpriv->window_lock, flags);
+ spin_lock_irqsave(&devpriv->window_lock, flags);
ni_writew(reg, Window_Address);
ni_writew(data, Window_Data);
- comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
+ spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
static uint16_t e_series_win_in(struct comedi_device *dev, int reg)
unsigned long flags;
uint16_t ret;
- comedi_spin_lock_irqsave(&devpriv->window_lock, flags);
+ spin_lock_irqsave(&devpriv->window_lock, flags);
ni_writew(reg, Window_Address);
ret = ni_readw(Window_Data);
- comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
+ spin_unlock_irqrestore(&devpriv->window_lock, flags);
return ret;
}
offset = M_Offset_AO_FIFO_Clear;
break;
case DIO_Control_Register:
- rt_printk
+ printk
("%s: FIXME: register 0x%x does not map cleanly on to m-series boards.\n",
__func__, reg);
return;
/* FIXME: DIO_Output_Register (16 bit reg) is replaced by M_Offset_Static_Digital_Output (32 bit)
and M_Offset_SCXI_Serial_Data_Out (8 bit) */
default:
- rt_printk("%s: bug! unhandled register=0x%x in switch.\n",
+ printk("%s: bug! unhandled register=0x%x in switch.\n",
__func__, reg);
BUG();
return;
offset = M_Offset_G01_Status;
break;
default:
- rt_printk("%s: bug! unhandled register=0x%x in switch.\n",
+ printk("%s: bug! unhandled register=0x%x in switch.\n",
__func__, reg);
BUG();
return 0;
offset = M_Offset_G1_Load_B;
break;
default:
- rt_printk("%s: bug! unhandled register=0x%x in switch.\n",
+ printk("%s: bug! unhandled register=0x%x in switch.\n",
__func__, reg);
BUG();
return;
offset = M_Offset_G1_Save;
break;
default:
- rt_printk("%s: bug! unhandled register=0x%x in switch.\n",
+ printk("%s: bug! unhandled register=0x%x in switch.\n",
__func__, reg);
BUG();
return 0;
{
mio_common_detach(dev);
if (dev->irq) {
- comedi_free_irq(dev->irq, dev);
+ free_irq(dev->irq, dev);
}
if (dev->private) {
mite_free_ring(devpriv->ai_mite_ring);
printk(" unknown irq (bad)\n");
} else {
printk(" ( irq = %u )", dev->irq);
- ret = comedi_request_irq(dev->irq, ni_E_interrupt,
- NI_E_IRQ_FLAGS, DRV_NAME,
- dev);
+ ret = request_irq(dev->irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
+ DRV_NAME, dev);
if (ret < 0) {
printk(" irq not available\n");
dev->irq = 0;