Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 513192fc authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_3501: cleanup the digital input subdevice



The board supported by this driver has 2 digital input. Remove the
conditional and always init the subdevice.

Also, move the subdevice insn_bits function pointer as well as the
n_chan out of the boardinfo and use them to initialize the subdevice
directly.

Since devpriv->s_EeParameters.i_NbrDiChannel for the digital input
subdevice is no longer being used, remove initialization of it also.

Copy the apci3501_di_insn_bits() function from hwrdv_apci3501.c into
the main driver file.

Fix the subdev_flags for the subdevice. The only required flag is
SDF_READABLE. The SDF_GROUND and SDF_COMMON flags only have meaning
for analog subdevices.

Remove the len_chanlist initialization, it only has meaning for subdevices
that support commands.

Remove the io_bits initialization, it only has meaning for digital i/o
subdevices that have configurable outputs.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 953a36c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment