From: Ian Abbott Date: Wed, 29 Oct 2014 17:35:11 +0000 (+0000) Subject: staging: comedi: das16: deschedule timer routine on detach X-Git-Tag: omap-for-v3.19/fixes-rc1~73^2~554 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab784e5075698ed3b767d5e264a50aab39add209;p=pandora-kernel.git staging: comedi: das16: deschedule timer routine on detach The "das16" driver optionally uses a kernel timer and a DMA channel to support asynchronous data acquisition, but currently never calls `del_timer_sync()`. There is some possibility the timer routine could still be scheduled to run when the comedi "detach" handler is run to clean up the device and cause a certain amount of havoc. Avoid that by calling `del_time_sync()` in the comedi "detach" handler `das16_detach()` if the timer was initialized by the "attach" handler `das16_attach()`. Use the timer's `data` member to tell whether it was initialized or not. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed