Commit e199ec95 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: adv_pci1710: convert boardinfo initialization to C99 format

Convert the boardinfo initialization to C99 format to make it
less error prone.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6bd65164
...@@ -202,40 +202,124 @@ struct boardtype { ...@@ -202,40 +202,124 @@ struct boardtype {
}; };
static const struct boardtype boardtypes[] = { static const struct boardtype boardtypes[] = {
{"pci1710", 0x1710, {
IORANGE_171x, 1, TYPE_PCI171X, .name = "pci1710",
16, 8, 2, 16, 16, 1, 0x0fff, 0x0fff, .device_id = 0x1710,
&range_pci1710_3, range_codes_pci1710_3, .iorange = IORANGE_171x,
&range_pci171x_da, .have_irq = 1,
10000, 2048}, .cardtype = TYPE_PCI171X,
{"pci1710hg", 0x1710, .n_aichan = 16,
IORANGE_171x, 1, TYPE_PCI171X, .n_aichand = 8,
16, 8, 2, 16, 16, 1, 0x0fff, 0x0fff, .n_aochan = 2,
&range_pci1710hg, range_codes_pci1710hg, .n_dichan = 16,
&range_pci171x_da, .n_dochan = 16,
10000, 2048}, .n_counter = 1,
{"pci1711", 0x1711, .ai_maxdata = 0x0fff,
IORANGE_171x, 1, TYPE_PCI171X, .ao_maxdata = 0x0fff,
16, 0, 2, 16, 16, 1, 0x0fff, 0x0fff, .rangelist_ai = &range_pci1710_3,
&range_pci17x1, range_codes_pci17x1, &range_pci171x_da, .rangecode_ai = range_codes_pci1710_3,
10000, 512}, .rangelist_ao = &range_pci171x_da,
{"pci1713", 0x1713, .ai_ns_min = 10000,
IORANGE_171x, 1, TYPE_PCI1713, .fifo_half_size = 2048,
32, 16, 0, 0, 0, 0, 0x0fff, 0x0000, }, {
&range_pci1710_3, range_codes_pci1710_3, NULL, .name = "pci1710hg",
10000, 2048}, .device_id = 0x1710,
{"pci1720", 0x1720, .iorange = IORANGE_171x,
IORANGE_1720, 0, TYPE_PCI1720, .have_irq = 1,
0, 0, 4, 0, 0, 0, 0x0000, 0x0fff, .cardtype = TYPE_PCI171X,
NULL, NULL, &range_pci1720, .n_aichan = 16,
0, 0}, .n_aichand = 8,
{"pci1731", 0x1731, .n_aochan = 2,
IORANGE_171x, 1, TYPE_PCI171X, .n_dichan = 16,
16, 0, 0, 16, 16, 0, 0x0fff, 0x0000, .n_dochan = 16,
&range_pci17x1, range_codes_pci17x1, NULL, .n_counter = 1,
10000, 512}, .ai_maxdata = 0x0fff,
/* dummy entry corresponding to driver name */ .ao_maxdata = 0x0fff,
{.name = DRV_NAME}, .rangelist_ai = &range_pci1710hg,
.rangecode_ai = range_codes_pci1710hg,
.rangelist_ao = &range_pci171x_da,
.ai_ns_min = 10000,
.fifo_half_size = 2048,
}, {
.name = "pci1711",
.device_id = 0x1711,
.iorange = IORANGE_171x,
.have_irq = 1,
.cardtype = TYPE_PCI171X,
.n_aichan = 16,
.n_aichand = 0,
.n_aochan = 2,
.n_dichan = 16,
.n_dochan = 16,
.n_counter = 1,
.ai_maxdata = 0x0fff,
.ao_maxdata = 0x0fff,
.rangelist_ai = &range_pci17x1,
.rangecode_ai = range_codes_pci17x1,
.rangelist_ao = &range_pci171x_da,
.ai_ns_min = 10000,
.fifo_half_size = 512,
}, {
.name = "pci1713",
.device_id = 0x1713,
.iorange = IORANGE_171x,
.have_irq = 1,
.cardtype = TYPE_PCI1713,
.n_aichan = 32,
.n_aichand = 16,
.n_aochan = 0,
.n_dichan = 0,
.n_dochan = 0,
.n_counter = 0,
.ai_maxdata = 0x0fff,
.ao_maxdata = 0x0000,
.rangelist_ai = &range_pci1710_3,
.rangecode_ai = range_codes_pci1710_3,
.rangelist_ao = NULL,
.ai_ns_min = 10000,
.fifo_half_size = 2048,
}, {
.name = "pci1720",
.device_id = 0x1720,
.iorange = IORANGE_1720,
.have_irq = 0,
.cardtype = TYPE_PCI1720,
.n_aichan = 0,
.n_aichand = 0,
.n_aochan = 4,
.n_dichan = 0,
.n_dochan = 0,
.n_counter = 0,
.ai_maxdata = 0x0000,
.ao_maxdata = 0x0fff,
.rangelist_ai = NULL,
.rangecode_ai = NULL,
.rangelist_ao = &range_pci1720,
.ai_ns_min = 0,
.fifo_half_size = 0,
}, {
.name = "pci1731",
.device_id = 0x1731,
.iorange = IORANGE_171x,
.have_irq = 1,
.cardtype = TYPE_PCI171X,
.n_aichan = 16,
.n_aichand = 0,
.n_aochan = 0,
.n_dichan = 16,
.n_dochan = 16,
.n_counter = 0,
.ai_maxdata = 0x0fff,
.ao_maxdata = 0x0000,
.rangelist_ai = &range_pci17x1,
.rangecode_ai = range_codes_pci17x1,
.rangelist_ao = NULL,
.ai_ns_min = 10000,
.fifo_half_size = 512,
}, {
/* dummy entry corresponding to driver name */
.name = DRV_NAME,
},
}; };
struct pci1710_private { struct pci1710_private {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment