Commit 86476d9f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: cb_pcimdda: remove boardinfo

The boardinfo struct and associated code is no longer needed
by this driver. Remove it.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent accff350
...@@ -98,22 +98,6 @@ Configuration Options: ...@@ -98,22 +98,6 @@ Configuration Options:
#define PCIMDDA_DA_CHAN(x) (0x00 + (x) * 2) #define PCIMDDA_DA_CHAN(x) (0x00 + (x) * 2)
#define PCIMDDA_8255_BASE_REG 0x0c #define PCIMDDA_8255_BASE_REG 0x0c
/*
* This is straight from skel.c -- I did this in case this source file
* will someday support more than 1 board...
*/
struct cb_pcimdda_board {
const char *name;
unsigned short device_id;
};
static const struct cb_pcimdda_board cb_pcimdda_boards[] = {
{
.name = "cb_pcimdda06-16",
.device_id = PCI_ID_PCIM_DDA06_16,
}
};
/* /*
* this structure is for data unique to this hardware driver. If * this structure is for data unique to this hardware driver. If
* several hardware drivers keep similar information in this structure, * several hardware drivers keep similar information in this structure,
...@@ -197,24 +181,20 @@ static struct pci_dev *cb_pcimdda_probe(struct comedi_device *dev, ...@@ -197,24 +181,20 @@ static struct pci_dev *cb_pcimdda_probe(struct comedi_device *dev,
struct comedi_devconfig *it) struct comedi_devconfig *it)
{ {
struct pci_dev *pcidev = NULL; struct pci_dev *pcidev = NULL;
int index;
for_each_pci_dev(pcidev) { for_each_pci_dev(pcidev) {
if (pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS) if (pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS)
continue; continue;
for (index = 0; index < ARRAY_SIZE(cb_pcimdda_boards); index++) { if (pcidev->device != PCI_ID_PCIM_DDA06_16)
if (cb_pcimdda_boards[index].device_id != pcidev->device) continue;
if (it->options[0] || it->options[1]) {
if (pcidev->bus->number != it->options[0] ||
PCI_SLOT(pcidev->devfn) != it->options[1]) {
continue; continue;
if (it->options[0] || it->options[1]) {
if (pcidev->bus->number != it->options[0] ||
PCI_SLOT(pcidev->devfn) != it->options[1]) {
continue;
}
} }
dev->board_ptr = cb_pcimdda_boards + index;
return pcidev;
} }
return pcidev;
} }
return NULL; return NULL;
} }
...@@ -222,7 +202,6 @@ static struct pci_dev *cb_pcimdda_probe(struct comedi_device *dev, ...@@ -222,7 +202,6 @@ static struct pci_dev *cb_pcimdda_probe(struct comedi_device *dev,
static int cb_pcimdda_attach(struct comedi_device *dev, static int cb_pcimdda_attach(struct comedi_device *dev,
struct comedi_devconfig *it) struct comedi_devconfig *it)
{ {
const struct cb_pcimdda_board *thisboard;
struct cb_pcimdda_private *devpriv; struct cb_pcimdda_private *devpriv;
struct pci_dev *pcidev; struct pci_dev *pcidev;
struct comedi_subdevice *s; struct comedi_subdevice *s;
...@@ -237,8 +216,7 @@ static int cb_pcimdda_attach(struct comedi_device *dev, ...@@ -237,8 +216,7 @@ static int cb_pcimdda_attach(struct comedi_device *dev,
if (!pcidev) if (!pcidev)
return -EIO; return -EIO;
comedi_set_hw_dev(dev, &pcidev->dev); comedi_set_hw_dev(dev, &pcidev->dev);
thisboard = comedi_board(dev); dev->board_name = dev->driver->driver_name;
dev->board_name = thisboard->name;
ret = comedi_pci_enable(pcidev, dev->board_name); ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment