#define NI_E_IRQ_FLAGS 0
+typedef struct{
+ struct pci_dev *isapnp_dev;
+ NI_PRIVATE_COMMON
+}ni_private;
+#define devpriv ((ni_private *)dev->private)
/* How we access registers */
{
unsigned long flags;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
if((addr)<8){
ni_writew(data,addr*2);
}else{
ni_writew(addr,Window_Address);
ni_writew(data,Window_Data);
}
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
}
#define win_in(addr) __win_in(dev,addr)
unsigned long flags;
int ret;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
if(addr<8){
ret = ni_readw(addr*2);
}else{
ni_writew(addr,Window_Address);
ret = ni_readw(Window_Data);
}
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
return ret;
}
MODULE_DEVICE_TABLE(isapnp, device_ids);
#endif
-typedef struct{
- struct pci_dev *isapnp_dev;
- NI_PRIVATE_COMMON
-}ni_private;
-#define devpriv ((ni_private *)dev->private)
-
static int ni_atmio_attach(comedi_device *dev,comedi_devconfig *it);
static int ni_atmio_detach(comedi_device *dev);
static comedi_driver driver_atmio={
#define NI_E_IRQ_FLAGS SA_SHIRQ
+typedef struct{
+ dev_link_t *link;
+
+ NI_PRIVATE_COMMON
+}ni_private;
+#define devpriv ((ni_private *)dev->private)
/* How we access registers */
{
unsigned long flags;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
if(addr<8){
ni_writew(data,addr*2);
}else{
ni_writew(addr,Window_Address);
ni_writew(data,Window_Data);
}
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
}
#define win_in(addr) __win_in(dev,addr)
unsigned long flags;
int ret;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
if(addr<8){
ret = ni_readw(addr*2);
}else{
ni_writew(addr,Window_Address);
ret = ni_readw(Window_Data);
}
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
return ret;
}
-typedef struct{
- dev_link_t *link;
-
- NI_PRIVATE_COMMON
-}ni_private;
-#define devpriv ((ni_private *)dev->private)
-
static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it);
static int mio_cs_detach(comedi_device *dev);
static comedi_driver driver_ni_mio_cs={
};
COMEDI_INITCLEANUP(driver_pcimio);
+typedef struct{
+ struct mite_struct *mite;
+
+ NI_PRIVATE_COMMON
+
+ unsigned int last_buf_write_count;
+}ni_private;
+#define devpriv ((ni_private *)dev->private)
/* How we access registers */
{
unsigned long flags;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
ni_writew(addr,Window_Address);
ni_writew(data,Window_Data);
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
}
#define win_in(addr) __win_in(dev,addr)
unsigned long flags;
int ret;
- comedi_spin_lock_irqsave(&dev->spinlock,flags);
+ comedi_spin_lock_irqsave(&devpriv->window_lock,flags);
ni_writew(addr,Window_Address);
ret = ni_readw(Window_Data);
- comedi_spin_unlock_irqrestore(&dev->spinlock,flags);
+ comedi_spin_unlock_irqrestore(&devpriv->window_lock,flags);
return ret;
}
#define NI_E_IRQ_FLAGS SA_SHIRQ
-
-typedef struct{
- struct mite_struct *mite;
-
- NI_PRIVATE_COMMON
-
- unsigned int last_buf_write_count;
-}ni_private;
-#define devpriv ((ni_private *)dev->private)
-
-
#include "ni_mio_common.c"