diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-08-30 10:47:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 07:47:40 -0700 |
commit | 09567cb4373e962a3079bb06352e1e5452d9a340 (patch) | |
tree | 74b4ffb9a80917018f76e821df5f1e6af5b91cf8 /drivers/staging/comedi/drivers/adl_pci6208.c | |
parent | Staging: comedi: ni_at_a2150: Remove a few superfluous braces (diff) | |
download | linux-dev-09567cb4373e962a3079bb06352e1e5452d9a340.tar.xz linux-dev-09567cb4373e962a3079bb06352e1e5452d9a340.zip |
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>
Diffstat (limited to 'drivers/staging/comedi/drivers/adl_pci6208.c')
-rw-r--r-- | drivers/staging/comedi/drivers/adl_pci6208.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c index a67ad57cefcb..28975061134b 100644 --- a/drivers/staging/comedi/drivers/adl_pci6208.c +++ b/drivers/staging/comedi/drivers/adl_pci6208.c @@ -221,7 +221,6 @@ static int pci6208_auto_attach(struct comedi_device *dev, val = inw(dev->iobase + PCI6208_DIO); val = (val & PCI6208_DIO_DO_MASK) >> PCI6208_DIO_DO_SHIFT; s->state = val; - s->io_bits = 0x0f; dev_info(dev->class_dev, "%s: %s, I/O base=0x%04lx\n", dev->driver->driver_name, dev->board_name, dev->iobase); |