From ee3526966589b77edba46659ecaec269f67d7216 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 8 Apr 2013 18:19:41 -0700 Subject: [PATCH] staging: comedi: rti800: tidy up CR_{CHAN,RANGE} usage The insn->chanspec passed to the CR_{CHAN,RANGE} macros is an unsigned int. For aesthetic reasons, put the result of the macros into an unsigned int local var. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index 04ba9e69b00a..30d7245b6bae 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -169,10 +169,10 @@ static int rti800_ai_insn_read(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { struct rti800_private *devpriv = dev->private; + unsigned int chan = CR_CHAN(insn->chanspec); + unsigned int gain = CR_RANGE(insn->chanspec); int i, t; int status; - int chan = CR_CHAN(insn->chanspec); - unsigned gain = CR_RANGE(insn->chanspec); unsigned muxgain_bits; inb(dev->iobase + RTI800_ADCHI); @@ -223,7 +223,7 @@ static int rti800_ao_insn_read(struct comedi_device *dev, unsigned int *data) { struct rti800_private *devpriv = dev->private; - int chan = CR_CHAN(insn->chanspec); + unsigned int chan = CR_CHAN(insn->chanspec); int i; for (i = 0; i < insn->n; i++) @@ -238,7 +238,7 @@ static int rti800_ao_insn_write(struct comedi_device *dev, unsigned int *data) { struct rti800_private *devpriv = dev->private; - int chan = CR_CHAN(insn->chanspec); + unsigned int chan = CR_CHAN(insn->chanspec); int reg_lo = chan ? RTI800_DAC1LO : RTI800_DAC0LO; int reg_hi = chan ? RTI800_DAC1HI : RTI800_DAC0HI; int val = devpriv->ao_readback[chan]; -- 2.30.2