From dd62c4373ae1cd48d0f1561646443d2aed299e21 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 4 Nov 2014 10:53:50 -0700 Subject: [PATCH] staging: comedi: addi_apci_3120: fix counter and external interrupt disable The APCI3120_DISABLE_ALL_TIMER define define is not needed, and it's used incorrectly in apci3120_cancel(). The define is a mask of the bits needed to disable the counters. Writing the value directly sets unintended bits. Prior to writing the value, the 'devpriv->us_OutputRegister' is set to 0 and written to the register. This disables all the timers and the external trigger. Remove the unnecessary apci3120_exttrig_disable() call as well as the write of APCI3120_DISABLE_ALL_TIMER. In apci3120_interrupt(), remove the unnecessary mask and write to disable all the timers. The COMEDI_CB_EOA event will cause the core to call the (*cancel) operation which will disable the timers. Remove the unused define. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed