#define PCI6208_DIO_DI_MASK (0xf0)
#define PCI6208_DIO_DI_SHIFT (4)
-enum pci6208_boardid {
- BOARD_PCI6208,
-};
-
-struct pci6208_board {
- const char *name;
- int ao_chans;
-};
-
-static const struct pci6208_board pci6208_boards[] = {
- [BOARD_PCI6208] = {
- .name = "adl_pci6208",
- .ao_chans = 16, /* Only 8 usable on PCI-6208 */
- },
-};
-
static int pci6208_ao_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
}
static int pci6208_auto_attach(struct comedi_device *dev,
- unsigned long context)
+ unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
- const struct pci6208_board *boardinfo = NULL;
struct comedi_subdevice *s;
unsigned int val;
int ret;
- if (context < ARRAY_SIZE(pci6208_boards))
- boardinfo = &pci6208_boards[context];
- if (!boardinfo)
- return -ENODEV;
- dev->board_ptr = boardinfo;
- dev->board_name = boardinfo->name;
-
ret = comedi_pci_enable(dev);
if (ret)
return ret;
/* analog output subdevice */
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE;
- s->n_chan = boardinfo->ao_chans;
+ s->n_chan = 16; /* Only 8 usable on PCI-6208 */
s->maxdata = 0xffff;
s->range_table = &range_bipolar10;
s->insn_write = pci6208_ao_insn_write;
}
static const struct pci_device_id adl_pci6208_pci_table[] = {
- { PCI_VDEVICE(ADLINK, 0x6208), BOARD_PCI6208 },
+ { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, 0x6208) },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, adl_pci6208_pci_table);