summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-21 22:18:30 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 00:03:02 (GMT)
commit2762a09d7702bd14af499ac42e0a20ab876baa09 (patch)
tree97cab0acc593c90ce73d4672c16354fe02e71da2 /drivers
parent3f8e9e67cb8c0f99b3cb7936d650ad16adedbc34 (diff)
downloadlinux-fsl-qoriq-2762a09d7702bd14af499ac42e0a20ab876baa09.tar.xz
staging: comedi: addi_apci_2200: remove unnecessary boardinfo
The boardinfo is not longer needed by this driver. Remove it as well as the addi_find_boardinfo() function. This removes the final ties to the addi-data "common" code so remove the #include for it. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_2200.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c
index 7ea0dc6..6e490fd 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2200.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2200.c
@@ -2,8 +2,6 @@
#include "addi_watchdog.h"
#include "comedi_fc.h"
-#include "addi-data/addi_common.h"
-
/*
* I/O Register Map
*/
@@ -11,14 +9,6 @@
#define APCI2200_DO_REG 0x04
#define APCI2200_WDOG_REG 0x08
-static const struct addi_board apci2200_boardtypes[] = {
- {
- .pc_DriverName = "apci2200",
- .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
- .i_DeviceId = 0x1005,
- },
-};
-
static int apci2200_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
@@ -59,36 +49,14 @@ static int apci2200_reset(struct comedi_device *dev)
return 0;
}
-static const void *addi_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;
- if (this_board->i_VendorId == pcidev->vendor &&
- this_board->i_DeviceId == pcidev->device)
- return this_board;
- p += dev->driver->offset;
- }
- return NULL;
-}
-
static int apci2200_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 comedi_subdevice *s;
int ret, n_subdevices;
- this_board = addi_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;
ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret)
@@ -164,9 +132,6 @@ static struct comedi_driver apci2200_driver = {
.module = THIS_MODULE,
.auto_attach = apci2200_auto_attach,
.detach = apci2200_detach,
- .num_names = ARRAY_SIZE(apci2200_boardtypes),
- .board_name = &apci2200_boardtypes[0].pc_DriverName,
- .offset = sizeof(struct addi_board),
};
static int apci2200_pci_probe(struct pci_dev *dev,