summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-01-21 17:22:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 19:59:13 +0800
commit8518a52c4456c697033bf81f0df73c026200ad8e (patch)
tree33e5b47ed04d35a8c2b034b32228e23493d00944
parentc79089c8d625824863bd922c9cf4096b54a98709 (diff)
staging: comedi: vmk80xx: GPCT_RESET is not an (*insn_config) instruction
The data[0] parameter to (*insn_config) functions is the "configuration instruction" that should be handled. These are defined by the enum configuration_ids in comedi.h. This driver is currently checking the data[0] value to be INSN_CONFIG_RESET or GPCT_RESET in order to reset a counter channel. GPCT_RESET is defined as 0x0001 which would match the configuration instruction INSN_CONFIG_DIO_OUTPUT. That doesn't make any sense for a counter. Remove GPCT_RESET from the insn_cmd test. 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>
-rw-r--r--drivers/staging/comedi/drivers/vmk80xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 5312e0fff79c..d200ad52e728 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -558,7 +558,7 @@ static int vmk80xx_cnt_insn_config(struct comedi_device *dev,
int n;
insn_cmd = data[0];
- if (insn_cmd != INSN_CONFIG_RESET && insn_cmd != GPCT_RESET)
+ if (insn_cmd != INSN_CONFIG_RESET)
return -EINVAL;
down(&devpriv->limit_sem);