staging: comedi: pcl816: define the mode register bits
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 <382ff55d8e07d1082d179e669636cd1552da4f36@visionengravers.com>
Reviewed-by: Ian Abbott <9e6ba6483b6a3e14d61f7c987e72ecb5b46122d6@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs