Skip to content

Commit

Permalink
staging: comedi: rti800: tidy up CR_{CHAN,RANGE} usage
Browse files Browse the repository at this point in the history
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 9, 2013
1 parent 0682323 commit ee35269
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/comedi/drivers/rti800.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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++)
Expand All @@ -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];
Expand Down

0 comments on commit ee35269

Please sign in to comment.