staging: comedi: pcmmio: unwind the digital i/o subdevice init
The board supported by this driver only has one asic that provides the two digital i/o subdevices. The first dio subdevice has 24 channels that support interrupts. The second dio subdevice also has 24 channels but no interrupt support. To make the code clearer and easier to maintain, remove the for () loop that initialized these subdevices. Also, correctly initialize the interrupt subdevice. The current code does not set the SDF_CMD_READ subdev_flag and does not set the dev->read_subdev pointer in the comedi_device. Use the dev->read_subdev pointer in the interrupt handler to get the interrupt subdevice and private data pointer instead of searching for them. To keep this patch reviewable, the extra indents in interrupt_pcmmio() will be removed later. 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>
Showing
Please register or sign in to comment