summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2017-01-04 10:55:47 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-10 17:38:32 +0100
commitaa72f35ea6f250aacdea5d14094bd323837c1d51 (patch)
tree93474613ed888b84ae03e0a7e45fbec071d37b6b /drivers/staging/comedi/comedi_fops.c
parent41ab27de8fe79e201223a63beed1c4c9f572175b (diff)
staging: comedi: daqboard2000: use pci_id_table 'driver_data'
The driver's COMEDI "auto-attach" handler `db2k_auto_attach()` calls `db2k_find_boardinfo()` to find an element of our board information array `db2k_boardtypes[]` that matches the probed PCI device. The driver's PCI device table matches several boards in the DaqBoard/2000 series that match a single PCI vendor and device ID combination. `db2k_find_boardinfo()` uses the probed PCI device's subvendor and subdevice IDs to find the matching board information, returning `NULL` for no match. Change the driver's PCI device table `db2k_pci_table[]` to match supported PCI vendor, device, subvendor and subdevice IDs, and set the `.driver_data` member of each element to the index of the matching element of `db2k_boardtypes[]`. That index gets passed through to the COMEDI auto-attach handler `db2k_auto_attach()`. Use it to index directly into `db2k_boardtypes[]` instead of calling `db2k_find_boardinfo()` to find the match. Use array index designators in the initializer of `db2k_boardtypes[]`. Use enumerated constants defined by new type `enum db2k_boardids` to name the board type indices. The `id` member of `struct db2k_boardtype` is no longer used, so remove it. Also remove the subdevice ID macros `DB2K_SUBSYSTEM_IDS2` and `DB2K_SUBSYSTEM_IDS4` as the subdevice IDs are now specified as numbers in the PCI device table. Remove `db2k_find_boardinfo()` as it is no longer used. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
0 files changed, 0 insertions, 0 deletions