staging: comedi: ni_labpc: fix 8255 dio subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Mar 2013 16:44:38 +0000 (09:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:41:51 +0000 (11:41 -0700)
commit370c8e1f76a316ba698d3ef525dd95d83db7b097
treee573a594a144360fb309f8adc12987689c2d9c5f
parent9bffb75d7510c44ce227d940cd8663df911bc487
staging: comedi: ni_labpc: fix 8255 dio subdevice init

The subdev_8255_init() function can fail. Check for failure and
return the errno.

Consolidate the mmio/ioport calls to subdev_8255_init(). The callback
function can be added with a simple ? : test and the cast of the iobase
is not necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_labpc.c