Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324534
b: refs/heads/master
c: a38936f
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Aug 15, 2012
1 parent b3ece2f commit 7366559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 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: 8fda437d8924d2f9c864d805862b43ff36020c5b
refs/heads/master: a38936fe819a59c88957ef4bda6a33c0a537938a
38 changes: 2 additions & 36 deletions trunk/drivers/staging/comedi/drivers/dyna_pci10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ static const struct comedi_lrange range_pci1050_ai = { 3, {

static const char range_codes_pci1050_ai[] = { 0x00, 0x10, 0x30 };

struct boardtype {
const char *name;
int device_id;
};

static const struct boardtype boardtypes[] = {
{
.name = "dyna_pci1050",
.device_id = 0x1050,
},
/* dummy entry corresponding to driver name */
{.name = DRV_NAME},
};

struct dyna_pci10xx_private {
struct mutex mutex;
unsigned long BADR3;
Expand Down Expand Up @@ -194,35 +180,16 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev,
return insn->n;
}

static const void *dyna_pci10xx_find_boardinfo(struct comedi_device *dev,
struct pci_dev *pcidev)
{
const struct boardtype *thisboard;
int i;

for (i = 0; i < ARRAY_SIZE(boardtypes); ++i) {
thisboard = &boardtypes[i];
if (pcidev->device != thisboard->device_id)
return thisboard;
}
return NULL;
}

static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
struct pci_dev *pcidev)
{
const struct boardtype *thisboard;
struct dyna_pci10xx_private *devpriv;
struct comedi_subdevice *s;
int ret;

comedi_set_hw_dev(dev, &pcidev->dev);

thisboard = dyna_pci10xx_find_boardinfo(dev, pcidev);
if (!thisboard)
return -ENODEV;
dev->board_ptr = thisboard;
dev->board_name = thisboard->name;
dev->board_name = dev->driver->driver_name;

ret = alloc_private(dev, sizeof(*devpriv));
if (ret)
Expand Down Expand Up @@ -282,8 +249,7 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev,
s->state = 0;
s->insn_bits = dyna_pci10xx_do_insn_bits;

dev_info(dev->class_dev, "%s: %s attached\n",
dev->driver->driver_name, dev->board_name);
dev_info(dev->class_dev, "%s attached\n", dev->board_name);

return 0;
}
Expand Down

0 comments on commit 7366559

Please sign in to comment.