diff options
author | Jian Zhang <kernel@ubicomp.com.au> | 2018-03-23 18:49:09 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-23 15:55:21 +0100 |
commit | 0c27d1747b9409b7fa4f0a90f10facd4577edee4 (patch) | |
tree | 122be98221d6dbef76b36a496279a621e703b7b2 /drivers/staging/comedi | |
parent | 9eb7194690ba358db58da3180b11e526496481bc (diff) | |
download | blackbird-obmc-linux-0c27d1747b9409b7fa4f0a90f10facd4577edee4.tar.gz blackbird-obmc-linux-0c27d1747b9409b7fa4f0a90f10facd4577edee4.zip |
Staging: comedi: fix multiple line dereference coding style issue in cb_pcidas64.c
This is a patch to the cb_pcidas64.c file that fixes up a multiple line
dereference warning found by the checkpatch.pl tool.
Signed-off-by: Jian Zhang <kernel@ubicomp.com.au>
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/cb_pcidas64.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 942ba5cd8270..fdd81c3beb51 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -2462,20 +2462,21 @@ static int setup_channel_queue(struct comedi_device *dev, writew(0, devpriv->main_iobase + ADC_QUEUE_CLEAR_REG); /* load external queue */ for (i = 0; i < cmd->chanlist_len; i++) { + unsigned int chanspec = cmd->chanlist[i]; + int use_differential; + bits = 0; /* set channel */ - bits |= adc_chan_bits(CR_CHAN(cmd-> - chanlist[i])); + bits |= adc_chan_bits(CR_CHAN(chanspec)); /* set gain */ bits |= ai_range_bits_6xxx(dev, - CR_RANGE(cmd-> - chanlist - [i])); + CR_RANGE(chanspec)); /* set single-ended / differential */ - bits |= se_diff_bit_6xxx(dev, - CR_AREF(cmd-> - chanlist[i]) == - AREF_DIFF); + use_differential = 0; + if (CR_AREF(chanspec) == AREF_DIFF) + use_differential = 1; + bits |= se_diff_bit_6xxx(dev, use_differential); + if (CR_AREF(cmd->chanlist[i]) == AREF_COMMON) bits |= ADC_COMMON_BIT; /* mark end of queue */ |