staging: comedi: cb_pcimdda: use attach_pci callback
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 17 Aug 2012 02:55:01 +0000 (19:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Aug 2012 15:17:36 +0000 (08:17 -0700)
commit22f2f541d06a874d8a5b228fca0186e333a1e351
tree146fa32e11706b98cc82310432ce374d93be88ea
parentaee815b53bca1cfa092ecd742fc59512b8030336
staging: comedi: cb_pcimdda: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function.

This driver does use an external configuration option to determine
the analog output range which is controlled by a jumper on the board.
In order to remove the legacy 'attach' callback, an assumption is made
that the jumper is in the factory setting position for +/-5V outputs.
This does not effect the operation of the board just the range info
that is returned to the user.

A sysfs method will be investigated to allow the user to change the
range.

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/cb_pcimdda.c