Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363415
b: refs/heads/master
c: 2667079
h: refs/heads/master
i:
  363413: 54c8329
  363411: da05d6a
  363407: 55f8d7f
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 11, 2013
1 parent 0eedc9f commit dd1334f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 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: cf55a71e43685b39ea6a2cf568a54d05b12b97d5
refs/heads/master: 2667079167fcb7300fe7c215b6ca07b1bceb8717
30 changes: 1 addition & 29 deletions trunk/drivers/staging/comedi/drivers/addi_apci_1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,49 +21,21 @@ static void fpu_end(void)
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_APCI1710.c"

static const struct addi_board apci1710_boardtypes[] = {
{
.pc_DriverName = "apci1710",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
.i_DeviceId = APCI1710_BOARD_DEVICE_ID,
},
};

static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
{
v_APCI1710_Interrupt(irq, d);
return IRQ_RETVAL(1);
}

static const void *apci1710_find_boardinfo(struct comedi_device *dev,
struct pci_dev *pcidev)
{
const struct addi_board *this_board;
int i;

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;
}
return NULL;
}

static int apci1710_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct addi_board *this_board;
struct addi_private *devpriv;
struct comedi_subdevice *s;
int ret;

this_board = apci1710_find_boardinfo(dev, pcidev);
if (!this_board)
return -ENODEV;
dev->board_ptr = this_board;
dev->board_name = this_board->pc_DriverName;
dev->board_name = dev->driver->driver_name;

devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
Expand Down

0 comments on commit dd1334f

Please sign in to comment.