staging: comedi: addi_apci_2200: cleanup digital input subdevice
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 18 Jan 2013 00:40:01 +0000 (17:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 20:49:25 +0000 (12:49 -0800)
commit41542073f5c21c724fdb004a568bffb0f217d7b8
treed223fa457209f7d70fd2e50f0bee9246deecad33
parent903b6c94bb51808d9619d9c17179202ff1a808f4
staging: comedi: addi_apci_2200: cleanup digital input subdevice

The board supported by this driver always has a digital input subdevice.
Remove the boardinfo for it and just open-code the relevant data in the
subdevice init.

Remove the SDF_GROUND and SDF_COMMON from the subdevice 'subdev_flags'.
These flags only have meaning for analog input/output subdevices.

Remove the subdevice 'len_chanlist' initialization. This variable only
has meaning for subdevices that support asynchronous commands.

Remove the subdevice 'io_bits' initialization. Digital input subdevices
don't use this variable.

Remove the subdevice function pointers that evaluate to NULL based on the
boardinfo data.

Move the apci2200_di_insn_bits() function from the hwdrv_apci2200.c file
into the main driver file.

For aesthetic reasons, rename the #define used for the register used to
read the digital inputs.

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/addi-data/hwdrv_apci2200.c
drivers/staging/comedi/drivers/addi_apci_2200.c