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

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

Convert the boardinfo initialization to C99 format to make it
less error prone.

The struct diosubd_data information is not converted to C99 format
yet because some of it will be removed.
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 e5200165
...@@ -250,126 +250,233 @@ struct dio_boardtype { ...@@ -250,126 +250,233 @@ struct dio_boardtype {
}; };
static const struct dio_boardtype boardtypes[] = { static const struct dio_boardtype boardtypes[] = {
{"pci1730", PCI_VENDOR_ID_ADVANTECH, 0x1730, PCIDIO_MAINREG, {
TYPE_PCI1730, .name = "pci1730",
{ {16, PCI1730_DI, 2, 0}, {16, PCI1730_IDI, 2, 0} }, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{ {16, PCI1730_DO, 2, 0}, {16, PCI1730_IDO, 2, 0} }, .device_id = 0x1730,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .main_pci_region = PCIDIO_MAINREG,
{4, PCI173x_BOARDID, 1, SDF_INTERNAL}, .cardtype = TYPE_PCI1730,
{ {0, 0, 0, 0} }, .sdi[0] = { 16, PCI1730_DI, 2, 0, },
IO_8b}, .sdi[1] = { 16, PCI1730_IDI, 2, 0, },
{"pci1733", PCI_VENDOR_ID_ADVANTECH, 0x1733, PCIDIO_MAINREG, .sdo[0] = { 16, PCI1730_DO, 2, 0, },
TYPE_PCI1733, .sdo[1] = { 16, PCI1730_IDO, 2, 0, },
{ {0, 0, 0, 0}, {32, PCI1733_IDI, 4, 0} }, .sdio[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdio[1] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .boardid = { 4, PCI173x_BOARDID, 1, SDF_INTERNAL, },
{4, PCI173x_BOARDID, 1, SDF_INTERNAL}, .s8254[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0} }, .io_access = IO_8b,
IO_8b}, }, {
{"pci1734", PCI_VENDOR_ID_ADVANTECH, 0x1734, PCIDIO_MAINREG, .name = "pci1733",
TYPE_PCI1734, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .device_id = 0x1733,
{ {0, 0, 0, 0}, {32, PCI1734_IDO, 4, 0} }, .main_pci_region = PCIDIO_MAINREG,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .cardtype = TYPE_PCI1733,
{4, PCI173x_BOARDID, 1, SDF_INTERNAL}, .sdi[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0} }, .sdi[1] = { 32, PCI1733_IDI, 4, 0, },
IO_8b}, .sdo[0] = { 0, 0, 0, 0, },
{"pci1735", PCI_VENDOR_ID_ADVANTECH, 0x1735, PCIDIO_MAINREG, .sdo[1] = { 0, 0, 0, 0, },
TYPE_PCI1735, .sdio[0] = { 0, 0, 0, 0, },
{ {32, PCI1735_DI, 4, 0}, {0, 0, 0, 0} }, .sdio[1] = { 0, 0, 0, 0, },
{ {32, PCI1735_DO, 4, 0}, {0, 0, 0, 0} }, .boardid = { 4, PCI173x_BOARDID, 1, SDF_INTERNAL, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .s8254[0] = { 0, 0, 0, 0, },
{ 4, PCI1735_BOARDID, 1, SDF_INTERNAL}, .io_access = IO_8b,
{ {3, PCI1735_C8254, 1, 0} }, }, {
IO_8b}, .name = "pci1734",
{"pci1736", PCI_VENDOR_ID_ADVANTECH, 0x1736, PCI1736_MAINREG, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
TYPE_PCI1736, .device_id = 0x1734,
{ {0, 0, 0, 0}, {16, PCI1736_IDI, 2, 0} }, .main_pci_region = PCIDIO_MAINREG,
{ {0, 0, 0, 0}, {16, PCI1736_IDO, 2, 0} }, .cardtype = TYPE_PCI1734,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdi[0] = { 0, 0, 0, 0, },
{4, PCI1736_BOARDID, 1, SDF_INTERNAL}, .sdi[1] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0} }, .sdo[0] = { 0, 0, 0, 0, },
IO_8b}, .sdo[1] = { 32, PCI1734_IDO, 4, 0, },
{"pci1739", PCI_VENDOR_ID_ADVANTECH, 0x1739, PCIDIO_MAINREG, .sdio[0] = { 0, 0, 0, 0 },
TYPE_PCI1739, .sdio[1] = { 0, 0, 0, 0 },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .boardid = { 4, PCI173x_BOARDID, 1, SDF_INTERNAL, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .s8254[0] = { 0, 0, 0, 0, },
{ {48, PCI1739_DIO, 2, 0}, {0, 0, 0, 0} }, .io_access = IO_8b,
{0, 0, 0, 0}, }, {
{ {0, 0, 0, 0} }, .name = "pci1735",
IO_8b}, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{"pci1750", PCI_VENDOR_ID_ADVANTECH, 0x1750, PCIDIO_MAINREG, .device_id = 0x1735,
TYPE_PCI1750, .main_pci_region = PCIDIO_MAINREG,
{ {0, 0, 0, 0}, {16, PCI1750_IDI, 2, 0} }, .cardtype = TYPE_PCI1735,
{ {0, 0, 0, 0}, {16, PCI1750_IDO, 2, 0} }, .sdi[0] = { 32, PCI1735_DI, 4, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdi[1] = { 0, 0, 0, 0, },
{0, 0, 0, 0}, .sdo[0] = { 32, PCI1735_DO, 4, 0, },
{ {0, 0, 0, 0} }, .sdo[1] = { 0, 0, 0, 0, },
IO_8b}, .sdio[0] = { 0, 0, 0, 0, },
{"pci1751", PCI_VENDOR_ID_ADVANTECH, 0x1751, PCIDIO_MAINREG, .sdio[1] = { 0, 0, 0, 0, },
TYPE_PCI1751, .boardid = { 4, PCI1735_BOARDID, 1, SDF_INTERNAL, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .s8254[0] = { 3, PCI1735_C8254, 1, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .io_access = IO_8b,
{ {48, PCI1751_DIO, 2, 0}, {0, 0, 0, 0} }, }, {
{0, 0, 0, 0}, .name = "pci1736",
{ {3, PCI1751_CNT, 1, 0} }, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
IO_8b}, .device_id = 0x1736,
{"pci1752", PCI_VENDOR_ID_ADVANTECH, 0x1752, PCIDIO_MAINREG, .main_pci_region = PCI1736_MAINREG,
TYPE_PCI1752, .cardtype = TYPE_PCI1736,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdi[0] = { 0, 0, 0, 0, },
{ {32, PCI1752_IDO, 2, 0}, {32, PCI1752_IDO2, 2, 0} }, .sdi[1] = { 16, PCI1736_IDI, 2, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdo[0] = { 0, 0, 0, 0, },
{4, PCI175x_BOARDID, 1, SDF_INTERNAL}, .sdo[1] = { 16, PCI1736_IDO, 2, 0, },
{ {0, 0, 0, 0} }, .sdio[0] = { 0, 0, 0, 0, },
IO_16b}, .sdio[1] = { 0, 0, 0, 0, },
{"pci1753", PCI_VENDOR_ID_ADVANTECH, 0x1753, PCIDIO_MAINREG, .boardid = { 4, PCI1736_BOARDID, 1, SDF_INTERNAL, },
TYPE_PCI1753, .s8254[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .io_access = IO_8b,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, }, {
{ {96, PCI1753_DIO, 4, 0}, {0, 0, 0, 0} }, .name = "pci1739",
{0, 0, 0, 0}, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{ {0, 0, 0, 0} }, .device_id = 0x1739,
IO_8b}, .main_pci_region = PCIDIO_MAINREG,
{"pci1753e", PCI_VENDOR_ID_ADVANTECH, 0x1753, PCIDIO_MAINREG, .cardtype = TYPE_PCI1739,
TYPE_PCI1753E, .sdi[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdi[1] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdo[0] = { 0, 0, 0, 0, },
{ {96, PCI1753_DIO, 4, 0}, {96, PCI1753E_DIO, 4, 0} }, .sdo[1] = { 0, 0, 0, 0, },
{0, 0, 0, 0}, .sdio[0] = { 48, PCI1739_DIO, 2, 0, },
{ {0, 0, 0, 0} }, .sdio[1] = { 0, 0, 0, 0, },
IO_8b}, .boardid = { 0, 0, 0, 0, },
{"pci1754", PCI_VENDOR_ID_ADVANTECH, 0x1754, PCIDIO_MAINREG, .s8254[0] = { 0, 0, 0, 0, },
TYPE_PCI1754, .io_access = IO_8b,
{ {32, PCI1754_IDI, 2, 0}, {32, PCI1754_IDI2, 2, 0} }, }, {
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .name = "pci1750",
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{4, PCI175x_BOARDID, 1, SDF_INTERNAL}, .device_id = 0x1750,
{ {0, 0, 0, 0} }, .main_pci_region = PCIDIO_MAINREG,
IO_16b}, .cardtype = TYPE_PCI1750,
{"pci1756", PCI_VENDOR_ID_ADVANTECH, 0x1756, PCIDIO_MAINREG, .sdi[0] = { 0, 0, 0, 0,},
TYPE_PCI1756, .sdi[1] = { 16, PCI1750_IDI, 2, 0, },
{ {0, 0, 0, 0}, {32, PCI1756_IDI, 2, 0} }, .sdo[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {32, PCI1756_IDO, 2, 0} }, .sdo[1] = { 16, PCI1750_IDO, 2, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdio[0] = { 0, 0, 0, 0, },
{4, PCI175x_BOARDID, 1, SDF_INTERNAL}, .sdio[1] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0} }, .boardid = { 0, 0, 0, 0, },
IO_16b}, .s8254[0] = { 0, 0, 0, 0, },
{"pci1760", PCI_VENDOR_ID_ADVANTECH, 0x1760, 0, .io_access = IO_8b,
TYPE_PCI1760, }, {
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, /* This card have own setup work */ .name = "pci1751",
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .vendor_id = PCI_VENDOR_ID_ADVANTECH,
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .device_id = 0x1751,
{0, 0, 0, 0}, .main_pci_region = PCIDIO_MAINREG,
{ {0, 0, 0, 0} }, .cardtype = TYPE_PCI1751,
IO_8b}, .sdi[0] = { 0, 0, 0, 0, },
{"pci1762", PCI_VENDOR_ID_ADVANTECH, 0x1762, PCIDIO_MAINREG, .sdi[1] = { 0, 0, 0, 0, },
TYPE_PCI1762, .sdo[0] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {16, PCI1762_IDI, 1, 0} }, .sdo[1] = { 0, 0, 0, 0, },
{ {0, 0, 0, 0}, {16, PCI1762_RO, 1, 0} }, .sdio[0] = { 48, PCI1751_DIO, 2, 0, },
{ {0, 0, 0, 0}, {0, 0, 0, 0} }, .sdio[1] = { 0, 0, 0, 0, },
{4, PCI1762_BOARDID, 1, SDF_INTERNAL}, .boardid = { 0, 0, 0, 0, },
{ {0, 0, 0, 0} }, .s8254[0] = { 3, PCI1751_CNT, 1, 0, },
IO_16b} .io_access = IO_8b,
}, {
.name = "pci1752",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1752,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1752,
.sdi[0] = { 0, 0, 0, 0, },
.sdi[1] = { 0, 0, 0, 0, },
.sdo[0] = { 32, PCI1752_IDO, 2, 0, },
.sdo[1] = { 32, PCI1752_IDO2, 2, 0, },
.sdio[0] = { 0, 0, 0, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 4, PCI175x_BOARDID, 1, SDF_INTERNAL, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_16b,
}, {
.name = "pci1753",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1753,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1753,
.sdi[0] = { 0, 0, 0, 0, },
.sdi[1] = { 0, 0, 0, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 0, 0, 0, 0, },
.sdio[0] = { 96, PCI1753_DIO, 4, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 0, 0, 0, 0, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_8b,
}, {
.name = "pci1753e",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1753,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1753E,
.sdi[0] = { 0, 0, 0, 0, },
.sdi[1] = { 0, 0, 0, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 0, 0, 0, 0, },
.sdio[0] = { 96, PCI1753_DIO, 4, 0, },
.sdio[1] = { 96, PCI1753E_DIO, 4, 0, },
.boardid = { 0, 0, 0, 0, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_8b,
}, {
.name = "pci1754",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1754,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1754,
.sdi[0] = { 32, PCI1754_IDI, 2, 0, },
.sdi[1] = { 32, PCI1754_IDI2, 2, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 0, 0, 0, 0, },
.sdio[0] = { 0, 0, 0, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 4, PCI175x_BOARDID, 1, SDF_INTERNAL, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_16b,
}, {
.name = "pci1756",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1756,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1756,
.sdi[0] = { 0, 0, 0, 0,},
.sdi[1] = { 32, PCI1756_IDI, 2, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 32, PCI1756_IDO, 2, 0, },
.sdio[0] = { 0, 0, 0, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 4, PCI175x_BOARDID, 1, SDF_INTERNAL, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_16b,
}, {
/* This card has its own 'attach' */
.name = "pci1760",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1760,
.main_pci_region = 0,
.cardtype = TYPE_PCI1760,
.sdi[0] = { 0, 0, 0, 0, },
.sdi[1] = { 0, 0, 0, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 0, 0, 0, 0, },
.sdio[0] = { 0, 0, 0, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 0, 0, 0, 0, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_8b,
}, {
.name = "pci1762",
.vendor_id = PCI_VENDOR_ID_ADVANTECH,
.device_id = 0x1762,
.main_pci_region = PCIDIO_MAINREG,
.cardtype = TYPE_PCI1762,
.sdi[0] = { 0, 0, 0, 0,},
.sdi[1] = { 16, PCI1762_IDI, 1, 0, },
.sdo[0] = { 0, 0, 0, 0, },
.sdo[1] = { 16, PCI1762_RO, 1, 0, },
.sdio[0] = { 0, 0, 0, 0, },
.sdio[1] = { 0, 0, 0, 0, },
.boardid = { 4, PCI1762_BOARDID, 1, SDF_INTERNAL, },
.s8254[0] = { 0, 0, 0, 0, },
.io_access = IO_16b,
},
}; };
struct pci_dio_private { struct pci_dio_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