]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: drivers: fix possible bug in comedi_handle_events()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 30 Mar 2016 17:47:25 +0000 (10:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Mar 2016 04:04:53 +0000 (21:04 -0700)
commit64cfc8cddfe98d14b3a72677d8afb4a7611c3a17
treec175c3b715586783c9f22bdbaec43abe03a00380
parent98da4bec2d187e1c6764548dd92f65ab05c2a794
staging: comedi: drivers: fix possible bug in comedi_handle_events()

This function assumes that the async subdevice has a cancel() function.
It looks like all the current comedi drivers implement a cancel() for
the async subdevices except for the dt2814 analog input usbdevice.

Fix comedi_handle_events() so it does not try to call a non-existent
cancel() function.

Add a dev_warn() to __comedi_device_postconfig_async() so that any new
driver authors will be reminded to implement the cancel().

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