Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363683
b: refs/heads/master
c: 3d9bfcc
h: refs/heads/master
i:
  363681: b2a1ea6
  363679: 5466673
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent 76eb768 commit f6fbb78
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 82 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d52361c6bd05488f8da3f4ac328b1f8df1701e96
refs/heads/master: 3d9bfccd13252efffbe2f31e8e66cecfd9e6cc65
167 changes: 86 additions & 81 deletions trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,95 +416,98 @@ struct dio200_board {
unsigned int mainsize;
};

static const struct dio200_board dio200_boards[] = {
#if DO_ISA
static const struct dio200_board dio200_isa_boards[] = {
{
.name = "pc212e",
.bustype = isa_bustype,
.model = pc212e_model,
.layout = pc212_layout,
.mainsize = DIO200_IO_SIZE,
},
.name = "pc212e",
.bustype = isa_bustype,
.model = pc212e_model,
.layout = pc212_layout,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pc214e",
.bustype = isa_bustype,
.model = pc214e_model,
.layout = pc214_layout,
.mainsize = DIO200_IO_SIZE,
},
.name = "pc214e",
.bustype = isa_bustype,
.model = pc214e_model,
.layout = pc214_layout,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pc215e",
.bustype = isa_bustype,
.model = pc215e_model,
.layout = pc215_layout,
.mainsize = DIO200_IO_SIZE,
},
.name = "pc215e",
.bustype = isa_bustype,
.model = pc215e_model,
.layout = pc215_layout,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pc218e",
.bustype = isa_bustype,
.model = pc218e_model,
.layout = pc218_layout,
.mainsize = DIO200_IO_SIZE,
},
.name = "pc218e",
.bustype = isa_bustype,
.model = pc218e_model,
.layout = pc218_layout,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pc272e",
.bustype = isa_bustype,
.model = pc272e_model,
.layout = pc272_layout,
.mainsize = DIO200_IO_SIZE,
},
.name = "pc272e",
.bustype = isa_bustype,
.model = pc272e_model,
.layout = pc272_layout,
.mainsize = DIO200_IO_SIZE,
},
};
#endif

#if DO_PCI
static const struct dio200_board dio200_pci_boards[] = {
{
.name = "pci215",
.devid = PCI_DEVICE_ID_AMPLICON_PCI215,
.bustype = pci_bustype,
.model = pci215_model,
.layout = pc215_layout,
.mainbar = 2,
.mainsize = DIO200_IO_SIZE,
},
.name = "pci215",
.devid = PCI_DEVICE_ID_AMPLICON_PCI215,
.bustype = pci_bustype,
.model = pci215_model,
.layout = pc215_layout,
.mainbar = 2,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pci272",
.devid = PCI_DEVICE_ID_AMPLICON_PCI272,
.bustype = pci_bustype,
.model = pci272_model,
.layout = pc272_layout,
.mainbar = 2,
.mainsize = DIO200_IO_SIZE,
},
.name = "pci272",
.devid = PCI_DEVICE_ID_AMPLICON_PCI272,
.bustype = pci_bustype,
.model = pci272_model,
.layout = pc272_layout,
.mainbar = 2,
.mainsize = DIO200_IO_SIZE,
},
{
.name = "pcie215",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE215,
.bustype = pci_bustype,
.model = pcie215_model,
.layout = pcie215_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
.name = "pcie215",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE215,
.bustype = pci_bustype,
.model = pcie215_model,
.layout = pcie215_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
{
.name = "pcie236",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE236,
.bustype = pci_bustype,
.model = pcie236_model,
.layout = pcie236_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
.name = "pcie236",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE236,
.bustype = pci_bustype,
.model = pcie236_model,
.layout = pcie236_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
{
.name = "pcie296",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE296,
.bustype = pci_bustype,
.model = pcie296_model,
.layout = pcie296_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
#endif
.name = "pcie296",
.devid = PCI_DEVICE_ID_AMPLICON_PCIE296,
.bustype = pci_bustype,
.model = pcie296_model,
.layout = pcie296_layout,
.mainbar = 1,
.mainshift = 3,
.mainsize = DIO200_PCIE_IO_SIZE,
},
};
#endif

/*
* Layout descriptions - some ISA and PCI board descriptions share the same
Expand Down Expand Up @@ -737,10 +740,10 @@ dio200_find_pci_board(struct pci_dev *pci_dev)
{
unsigned int i;

for (i = 0; i < ARRAY_SIZE(dio200_boards); i++)
if (is_pci_board(&dio200_boards[i]) &&
pci_dev->device == dio200_boards[i].devid)
return &dio200_boards[i];
for (i = 0; i < ARRAY_SIZE(dio200_pci_boards); i++)
if (is_pci_board(&dio200_pci_boards[i]) &&
pci_dev->device == dio200_pci_boards[i].devid)
return &dio200_pci_boards[i];
return NULL;
}

Expand Down Expand Up @@ -2046,9 +2049,11 @@ static struct comedi_driver amplc_dio200_driver = {
.attach = dio200_attach,
.auto_attach = dio200_auto_attach,
.detach = dio200_detach,
.board_name = &dio200_boards[0].name,
#if DO_ISA
.board_name = &dio200_isa_boards[0].name,
.offset = sizeof(struct dio200_board),
.num_names = ARRAY_SIZE(dio200_boards),
.num_names = ARRAY_SIZE(dio200_isa_boards),
#endif
};

#if DO_PCI
Expand Down

0 comments on commit f6fbb78

Please sign in to comment.