staging: comedi: initialize subdevice s->io_bits in postconfig
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 30 Aug 2013 17:47:03 +0000 (10:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:40 +0000 (07:47 -0700)
commit09567cb4373e962a3079bb06352e1e5452d9a340
tree74b4ffb9a80917018f76e821df5f1e6af5b91cf8
parentcb30fc50feb70762d7d82dab9f832ede3de1d067
staging: comedi: initialize subdevice s->io_bits in postconfig

The subdevice 'io_bits' is a bit mask of the i/o configuration for
digital subdevices. '0' values indicate that a channel is configured
as an input and '1' values that the channel is an output. Since the
subdevice data is kzalloc()'d, all channels default as inputs.

Modify __comedi_device_postconfig() so that 'io_bits' is correctly
initialized for Digital Output subdevices.

Remove all the unnecessary initializations of 's->io_bits' from the
drivers. Also, remove the unnecessary initialization of the 's->state'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
drivers/staging/comedi/drivers.c
drivers/staging/comedi/drivers/8255.c
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi_apci_3120.c
drivers/staging/comedi/drivers/adl_pci6208.c
drivers/staging/comedi/drivers/adl_pci9118.c
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/amplc_dio200_common.c
drivers/staging/comedi/drivers/icp_multi.c
drivers/staging/comedi/drivers/me_daq.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_daq_700.c