{
struct pci_dev *pci_device = NULL;
int result, i;
- struct me4000_board *board;
+ const struct me4000_board *board;
/* Allocate private memory */
if (alloc_private(dev, sizeof(struct me4000_info)) < 0)
}
}
dev->board_ptr = me4000_boards + i;
- board =
- (struct me4000_board *)
- dev->board_ptr;
+ board = comedi_board(dev);
info->pci_dev_p = pci_device;
goto found;
}
static int init_ao_context(struct comedi_device *dev)
{
+ const struct me4000_board *thisboard = comedi_board(dev);
int i;
for (i = 0; i < thisboard->ao_nchan; i++) {
struct comedi_subdevice *subdevice,
struct comedi_insn *insn, unsigned int *data)
{
-
+ const struct me4000_board *thisboard = comedi_board(dev);
int chan = CR_CHAN(insn->chanspec);
int rang = CR_RANGE(insn->chanspec);
int aref = CR_AREF(insn->chanspec);
static int ai_check_chanlist(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
+ const struct me4000_board *thisboard = comedi_board(dev);
int aref;
int i;
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
-
+ const struct me4000_board *thisboard = comedi_board(dev);
int chan = CR_CHAN(insn->chanspec);
int rang = CR_RANGE(insn->chanspec);
int aref = CR_AREF(insn->chanspec);
static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
+ const struct me4000_board *thisboard;
struct comedi_subdevice *s;
int result;
result = me4000_probe(dev, it);
if (result)
return result;
+ thisboard = comedi_board(dev);
result = comedi_alloc_subdevices(dev, 4);
if (result)