From: H Hartley Sweeten Date: Tue, 27 May 2014 17:30:45 +0000 (-0700) Subject: staging: comedi: das800: add a local var for the comedi_cmd pointer X-Git-Tag: next-20140530~19^2~51 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8ffffae6cf20099f03a9bb178b5c2f2c006b94a5;p=karo-tx-linux.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 38f6a6d9e1dc..1e2e3d56d9fe 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);