static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci1710_detach(struct comedi_device * dev);
-typedef struct {
+struct boardtype {
const char *name; // board name
int device_id;
int iorange; // I/O range len
const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int fifo_half_size; // size of FIFO/2
-} boardtype;
+};
static DEFINE_PCI_DEVICE_TABLE(pci1710_pci_table) = {
{PCI_VENDOR_ID_ADVANTECH, 0x1710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
MODULE_DEVICE_TABLE(pci, pci1710_pci_table);
-static const boardtype boardtypes[] = {
+static const struct boardtype boardtypes[] = {
{"pci1710", 0x1710,
IORANGE_171x, 1, TYPE_PCI171X,
16, 8, 2, 16, 16, 1, 0x0fff, 0x0fff,
{.name = DRV_NAME},
};
-#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
+#define n_boardtypes (sizeof(boardtypes)/sizeof(struct boardtype))
static struct comedi_driver driver_pci1710 = {
.driver_name = DRV_NAME,
.detach = pci1710_detach,
.num_names = n_boardtypes,
.board_name = &boardtypes[0].name,
- .offset = sizeof(boardtype),
+ .offset = sizeof(struct boardtype),
};
typedef struct {
} pci1710_private;
#define devpriv ((pci1710_private *)dev->private)
-#define this_board ((const boardtype *)dev->board_ptr)
+#define this_board ((const struct boardtype *)dev->board_ptr)
/*
==============================================================================