staging: comedi: adv_pci1710: only init async command members when needed
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 20:43:35 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 21:07:16 +0000 (13:07 -0800)
commit67fb892cc14aa3159aa68cbda2bd6cc30e2e7fd8
tree487152872ade3ecacd915ba00db6479239f31d59
parent19cf54dd39f2213232ceb4ed1102876a3bd983f1
staging: comedi: adv_pci1710: only init async command members when needed

The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.

Also, only init the dev->read_subdev if we have the irq.

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/adv_pci1710.c