From: Ian Abbott Date: Fri, 4 Jan 2013 11:33:25 +0000 (+0000) Subject: staging: comedi: comedi_test: tidy up waveform_ai_interrupt() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0642c94bcb2f3f61a3f68e98684a2b2f13f0411d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: comedi_test: tidy up waveform_ai_interrupt() Use a local variable to reduce the indentation in `waveform_ai_interrupt()`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index ce13fbc52ef9..a8e40cae2d79 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -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); } }