staging: comedi: amplc_dio200: Simplify PCI board look-up
Set the `driver_data` member of each element (apart from the sentinel)
of our PCI device table `dio200_pci_table[]` to the index of the
corresponding element of our private PCI board details
`dio200_pci_boards[]`. This index appears in the context parameter of
our auto_attach routine `dio200_auto_attach()`. In this function,
nename the parameter to `context_model` and use it to set
`dev->board_ptr` to point to an element of `dio200_pci_boards[] directly
by index instead of calling `dio200_find_pci_board()` to search for the
element whose `devid` member matches the PCI device ID.
Remove `dio200_find_pci_board()` and the `devid` member of `struct
dio200_board`. Also remove the `model` member of `struct dio200_board`
and the `enum dio200_model` type as we can do without them. The only
function that uses the `model` member is `dio200_auto_attach()`, so use
the `context_model` parameter instead.
Define the enumerated value for each PCI board in new type `enum
dio200_pci_model` which replaces `enum dio200_model` minus the
enumerated values for the ISA boards (so the numeric values for the PCI
boards have changed). Use these enumerated values to designate the
initializer for each element of `dio200_pci_boards[]`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>