Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325256
b: refs/heads/master
c: 6b79db3
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 14, 2012
1 parent f89c84c commit 3c028f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 606b04707e39cfc109273e8047c2b5600e407327
refs/heads/master: 6b79db383f77da171c9a60b607d761a357f36d2d
11 changes: 10 additions & 1 deletion trunk/drivers/staging/comedi/drivers/8255_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Configuration Options: not applicable, uses PCI auto config

struct pci_8255_boardinfo {
const char *name;
unsigned short vendor;
unsigned short device;
int dio_badr;
int n_8255;
Expand All @@ -76,36 +77,43 @@ struct pci_8255_boardinfo {
static const struct pci_8255_boardinfo pci_8255_boards[] = {
{
.name = "adl_pci-7224",
.vendor = PCI_VENDOR_ID_ADLINK,
.device = PCI_DEVICE_ID_ADLINK_PCI7224,
.dio_badr = 2,
.n_8255 = 1,
}, {
.name = "adl_pci-7248",
.vendor = PCI_VENDOR_ID_ADLINK,
.device = PCI_DEVICE_ID_ADLINK_PCI7248,
.dio_badr = 2,
.n_8255 = 2,
}, {
.name = "adl_pci-7296",
.vendor = PCI_VENDOR_ID_ADLINK,
.device = PCI_DEVICE_ID_ADLINK_PCI7296,
.dio_badr = 2,
.n_8255 = 4,
}, {
.name = "cb_pci-dio24",
.vendor = PCI_VENDOR_ID_CB,
.device = PCI_DEVICE_ID_CB_PCIDIO24,
.dio_badr = 2,
.n_8255 = 1,
}, {
.name = "cb_pci-dio24h",
.vendor = PCI_VENDOR_ID_CB,
.device = PCI_DEVICE_ID_CB_PCIDIO24H,
.dio_badr = 2,
.n_8255 = 1,
}, {
.name = "cb_pci-dio48h",
.vendor = PCI_VENDOR_ID_CB,
.device = PCI_DEVICE_ID_CB_PCIDIO48H,
.dio_badr = 1,
.n_8255 = 2,
}, {
.name = "cb_pci-dio96h",
.vendor = PCI_VENDOR_ID_CB,
.device = PCI_DEVICE_ID_CB_PCIDIO96H,
.dio_badr = 2,
.n_8255 = 4,
Expand All @@ -120,7 +128,8 @@ static const void *pci_8255_find_boardinfo(struct comedi_device *dev,

for (i = 0; i < ARRAY_SIZE(pci_8255_boards); i++) {
board = &pci_8255_boards[i];
if (pcidev->device == board->device)
if (pcidev->vendor == board->vendor &&
pcidev->device == board->device)
return board;
}
return NULL;
Expand Down

0 comments on commit 3c028f7

Please sign in to comment.