#endif
};
-/*
- * Useful for shorthand access to the particular board structure
- */
-#define thisboard ((struct labpc_boardinfo *)dev->board_ptr)
-
/* size in bytes of dma buffer */
static const int dma_buffer_size = 0xff00;
/* 2 bytes per sample */
unsigned int counter_number,
unsigned int count, unsigned int mode)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
+
if (thisboard->memory_mapped_io)
return i8254_mm_load((void __iomem *)base_address, 0,
counter_number, count, mode);
int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
unsigned int irq, unsigned int dma_chan)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s;
int i;
static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv;
unsigned long iobase = 0;
unsigned int irq = 0;
void labpc_common_detach(struct comedi_device *dev)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s;
static int labpc_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
int err = 0;
int tmp, tmp2;
unsigned int stop_mask;
static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int channel, range, aref;
#ifdef CONFIG_ISA_DMA_API
static irqreturn_t labpc_interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async;
static int labpc_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int i, n;
int chan, range;
static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
+ const struct labpc_boardinfo *thisboard = comedi_board(dev);
struct labpc_private *devpriv = dev->private;
int channel, range;
unsigned long flags;