]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: adv_pci1710: use the pci id_table 'driver_data'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 5 Mar 2013 16:59:29 +0000 (09:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 17:01:45 +0000 (10:01 -0700)
commit0005fbedc83e7bfb4f8e41aab5530f9a13e9dfc4
tree0d0cac6a121bff06fab701493bfa808e3f07d472
parentb5357e6111b6400852ce1d47c11cc9325d68bd02
staging: comedi: adv_pci1710: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well
the search function that was used to locate the boardinfo for the
PCI device.

The pci1710 and pci1710hg boards have the same vendor/device id so
it is impossible to determine which board is actually detected. The
boardinfo for the pci1710hg is identical to the pci1710 other than
the analog input range information. Remove the pci1710hg information
and #if out the range tables for that device with the define
USE_PCI1710HG_RANGE. Modify the pci1710 boardinfo accordingly to
use the same define to determine which range table to use. Until a
better solution is worked out, this will allow the driver to be
compiled to support the pci1710 (default) or pci1710hg.

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>
drivers/staging/comedi/drivers/adv_pci1710.c