diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:30:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:52 (GMT) |
commit | 8ffffae6cf20099f03a9bb178b5c2f2c006b94a5 (patch) | |
tree | b4815315d75a919b0eaf77a23d9cf5f165d16c4f /drivers/staging/comedi | |
parent | d54e5e6bc5de032641486843a0df41ac3f7167ed (diff) | |
download | linux-8ffffae6cf20099f03a9bb178b5c2f2c006b94a5.tar.xz |
staging: comedi: das800: add a local var for the comedi_cmd pointer
For aesthetics, use a local variable to access the comedi_cmd as a
pointer in das800_ai_do_cmd() instead of getting to it from the
comedi_async pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/das800.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 38f6a6d..1e2e3d5 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -404,9 +404,10 @@ static int das800_ai_do_cmd(struct comedi_device *dev, const struct das800_board *thisboard = comedi_board(dev); struct das800_private *devpriv = dev->private; struct comedi_async *async = s->async; - unsigned int gain = CR_RANGE(async->cmd.chanlist[0]); - unsigned int start_chan = CR_CHAN(async->cmd.chanlist[0]); - unsigned int end_chan = (start_chan + async->cmd.chanlist_len - 1) % 8; + struct comedi_cmd *cmd = &async->cmd; + unsigned int gain = CR_RANGE(cmd->chanlist[0]); + unsigned int start_chan = CR_CHAN(cmd->chanlist[0]); + unsigned int end_chan = (start_chan + cmd->chanlist_len - 1) % 8; unsigned int scan_chans = (end_chan << 3) | start_chan; int conv_bits; unsigned long irq_flags; @@ -424,8 +425,8 @@ static int das800_ai_do_cmd(struct comedi_device *dev, gain &= 0xf; outb(gain, dev->iobase + DAS800_GAIN); - if (async->cmd.stop_src == TRIG_COUNT) { - devpriv->count = async->cmd.stop_arg * async->cmd.chanlist_len; + if (cmd->stop_src == TRIG_COUNT) { + devpriv->count = cmd->stop_arg * cmd->chanlist_len; devpriv->forever = false; } else { /* TRIG_NONE */ devpriv->forever = true; @@ -437,9 +438,9 @@ static int das800_ai_do_cmd(struct comedi_device *dev, */ conv_bits = 0; conv_bits |= EACS | IEOC; - if (async->cmd.start_src == TRIG_EXT) + if (cmd->start_src == TRIG_EXT) conv_bits |= DTEN; - if (async->cmd.convert_src == TRIG_TIMER) { + if (cmd->convert_src == TRIG_TIMER) { conv_bits |= CASC | ITE; /* set conversion frequency */ das800_set_frequency(dev); |