diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-03-05 21:25:32 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-11 21:05:23 +0400 |
| commit | bfcded4656c09a60c836c6be566ae501adf15a50 (patch) | |
| tree | e0a68a1d8aeaeff33a8fc4d0504bc1757cdddd1d /drivers | |
| parent | dbae4575661da840353f12dd76499ad587c92519 (diff) | |
| download | linux-bfcded4656c09a60c836c6be566ae501adf15a50.tar.xz | |
staging: comedi: addi_common: remove addi_find_boardinfo()
All the users of the addi_common code now set the dev->board_ptr
before calling addi_auto_attach(). Remove the unnecessary function
that searches for the boardinfo.
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-data/addi_common.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index e9a4b43fda71..3140880948e1 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -84,23 +84,6 @@ 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) -{ - 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 addi_auto_attach(struct comedi_device *dev, unsigned long context_unused) { @@ -111,13 +94,6 @@ static int addi_auto_attach(struct comedi_device *dev, int ret, n_subdevices; unsigned int dw_Dummy; - if (!this_board) { - /* The driver did not set the board_ptr, try finding it. */ - this_board = addi_find_boardinfo(dev, pcidev); - if (!this_board) - return -ENODEV; - dev->board_ptr = this_board; - } dev->board_name = this_board->pc_DriverName; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); |
