From: H Hartley Sweeten Date: Tue, 4 Mar 2014 18:30:19 +0000 (-0700) Subject: staging: comedi: pcl816: define the mode register bits X-Git-Tag: v3.15-rc1~139^2~624 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cf215d730d5fc050603edd0d693e3520626b6a3;p=pandora-kernel.git staging: comedi: pcl816: define the mode register bits Define the bits in the register to remove the magic values. Fix pcl816_ai_cancel(). The 0x73 mask of the value read from the control register will not stop the A/D as indicated by the comment. This would just clear the DS1, POE, and EXT bits which would only disable the external trigger. Setting the control register to '0' would then stop the A/D which means the software trigger following it would not work. Just disable the trigger and clear any pending end-of-conversion. Make sure the A/D trigger is disabled at the end of the (*insn_read). Remove a couple unnecessary devpriv->dev checks. The pcl816_ai_cmd() and pcl816_ai_poll() functions are only hooked up when devpriv->dma is valid. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed