staging: comedi: das16: tidy up 8255 digital i/o subdevice
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 29 Jul 2013 21:04:13 +0000 (14:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:37:59 +0000 (17:37 -0700)
commit21b8f248976f7270595f27e878f0026baf99e6e3
tree7087ea8c443098f50ec32ae0946b65fc7544af21
parent22cfc772f5e55341708ac31881df69e233787b8a
staging: comedi: das16: tidy up 8255 digital i/o subdevice

The 8255 digital i/o subdevice is only available on some of the boards
supported by this driver. Currently the 'i8255_offset' member of the
boardinfo is used to indicate that it is available.

To clarify this support, add a 'has_8255' bit-field flag to the boardinfo.
We can then use this flag to conditionally allocate the space for the
subdevice only when it is needed.

Also, make sure to check that subdev_8255_init() is successful and propagate
any errors.

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>
drivers/staging/comedi/drivers/das16.c