diff options
| author | 2015-05-05 18:47:25 +0100 | |
|---|---|---|
| committer | 2015-05-10 14:57:26 +0200 | |
| commit | e899a4165cffe3aa802f813c624e90ce7ca23189 (patch) | |
| tree | 4130e598d6099cff385a88aeff03920e1c4ce20e /include/linux/platform_data | |
| parent | staging: comedi: gsc_hpdi: tidy up comments (diff) | |
staging: comedi: gsc_hpdi: remove multiple board type support
The code for determining which board type matches the PCI device ID is
over-the-top since only a single board type is supported. Also, the
method it uses match the PCI device ID to a board type is a little
antiquated. Most comedi drivers for PCI devices use `driver_data` from
the probed PCI device as an index into an array of supported board
types, but "gsc_hpdi" uses a `for` loop to find an element of
`hpdi_boards[]` that matches the PCI device. The only thing in
`hpdi_boards[]` not used for finding a matching PCI device is the `name`
member of `struct hpdi_board` which points to a string literal and ends
up getting assigned to `dev->board_name`.
Get rid of the multiple board type support, and set `dev->board_name` to
point to the original string literal pointed to by
`hpdi_boards[0].name`. This string is visible to userspace.
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 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
