Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337570
b: refs/heads/master
c: 678e4e2
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 1, 2012
1 parent 1b984e5 commit aa09296
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: c9ab760d63d33efee64bbe26b2002e459c3c4c57
refs/heads/master: 678e4e27bc31c78b3a7171d6e26d7825c46d5c36
15 changes: 5 additions & 10 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,17 @@ static int i_ADDI_Reset(struct comedi_device *dev)
return 0;
}

static const void *addi_find_boardinfo(struct comedi_device *dev,
struct pci_dev *pcidev)
static const void *apci1710_find_boardinfo(struct comedi_device *dev,
struct pci_dev *pcidev)
{
const void *p = dev->driver->board_name;
const struct addi_board *this_board;
int i;

for (i = 0; i < dev->driver->num_names; i++) {
this_board = p;
for (i = 0; i < ARRAY_SIZE(apci1710_boardtypes); i++) {
this_board = &apci1710_boardtypes[i];
if (this_board->i_VendorId == pcidev->vendor &&
this_board->i_DeviceId == pcidev->device)
return this_board;
p += dev->driver->offset;
}
return NULL;
}
Expand All @@ -80,7 +78,7 @@ static int apci1710_attach_pci(struct comedi_device *dev,
int ret, pages, i, n_subdevices;
unsigned int dw_Dummy;

this_board = addi_find_boardinfo(dev, pcidev);
this_board = apci1710_find_boardinfo(dev, pcidev);
if (!this_board)
return -ENODEV;
dev->board_ptr = this_board;
Expand Down Expand Up @@ -236,9 +234,6 @@ static struct comedi_driver apci1710_driver = {
.module = THIS_MODULE,
.attach_pci = apci1710_attach_pci,
.detach = apci1710_detach,
.num_names = ARRAY_SIZE(apci1710_boardtypes),
.board_name = &apci1710_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};

static int __devinit apci1710_pci_probe(struct pci_dev *dev,
Expand Down

0 comments on commit aa09296

Please sign in to comment.