Skip to content

Commit

Permalink
staging: comedi: comedi_test: tidy up waveform_ai_interrupt()
Browse files Browse the repository at this point in the history
Use a local variable to reduce the indentation in
`waveform_ai_interrupt()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 8bd48c9 commit 0642c94
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions drivers/staging/comedi/drivers/comedi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,13 @@ static void waveform_ai_interrupt(unsigned long arg)

for (i = 0; i < num_scans; i++) {
for (j = 0; j < cmd->chanlist_len; j++) {
cfc_write_to_buffer(dev->read_subdev,
fake_waveform(dev,
CR_CHAN(cmd->
chanlist[j]),
CR_RANGE(cmd->
chanlist[j]),
devpriv->
usec_current +
i *
devpriv->scan_period +
j *
devpriv->
convert_period));
unsigned short sample;
sample = fake_waveform(dev, CR_CHAN(cmd->chanlist[j]),
CR_RANGE(cmd->chanlist[j]),
devpriv->usec_current +
i * devpriv->scan_period +
j * devpriv->convert_period);
cfc_write_to_buffer(dev->read_subdev, sample);
}
}

Expand Down

0 comments on commit 0642c94

Please sign in to comment.