diff options
author | Chase Southwood <chase.southwood@gmail.com> | 2014-08-16 23:26:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-30 13:16:19 -0700 |
commit | cb3f491d3195510af1c79c37a01076b4408a2e3c (patch) | |
tree | 85c434cb9c7b2b6590caa76c9fd460333365e7eb /drivers | |
parent | b5283aab0483020a13b83cca09a840e50c4a2f9c (diff) |
staging: comedi: dt3000: remove unneeded variable
Coccinelle (using scripts/coccinelle/tests/doublebitand.cocci) found this
assignment because 0 is or'd twice. Upon inspection, I found that the
variable "mode" is only assigned once and used once, and thus can be
cleanly removed. This patch plugs its value straight into writew() and
then removes the variable.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/dt3000.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index 56e21cc2dcfe..176a7eeaa1c4 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -488,7 +488,6 @@ static int dt3k_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) unsigned int chan, range, aref; unsigned int divider; unsigned int tscandiv; - unsigned int mode; for (i = 0; i < cmd->chanlist_len; i++) { chan = CR_CHAN(cmd->chanlist[i]); @@ -513,8 +512,7 @@ static int dt3k_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) writew((tscandiv & 0xffff), dev->mmio + DPR_Params(4)); } - mode = DT3000_AD_RETRIG_INTERNAL | 0 | 0; - writew(mode, dev->mmio + DPR_Params(5)); + writew(DT3000_AD_RETRIG_INTERNAL, dev->mmio + DPR_Params(5)); writew(aref == AREF_DIFF, dev->mmio + DPR_Params(6)); writew(AI_FIFO_DEPTH / 2, dev->mmio + DPR_Params(7)); |