summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-05-27 10:30:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 14:28:52 -0700
commit9af39b31b57965f2b1f8b2bfdd8f313b485a87ff (patch)
treeea9dbac30206ad1123c28f4985cf71e836179ba2
parent71ba7506f05e6512e4b25df2233fa238025399d5 (diff)
downloadblackbird-obmc-linux-9af39b31b57965f2b1f8b2bfdd8f313b485a87ff.tar.gz
blackbird-obmc-linux-9af39b31b57965f2b1f8b2bfdd8f313b485a87ff.zip
staging: comedi: amplc_pci224: use comedi_cmd pointer
Use the local variable to access the comedi_cmd as a pointer in pci224_ao_munge() 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>
-rw-r--r--drivers/staging/comedi/drivers/amplc_pci224.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index e8beeab7a78b..44904fd87b27 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -987,7 +987,7 @@ pci224_ao_munge(struct comedi_device *dev, struct comedi_subdevice *s,
{
const struct pci224_board *thisboard = comedi_board(dev);
struct pci224_private *devpriv = dev->private;
- struct comedi_async *async = s->async;
+ struct comedi_cmd *cmd = &s->async->cmd;
unsigned short *array = data;
unsigned int length = num_bytes / sizeof(*array);
unsigned int offset;
@@ -997,7 +997,7 @@ pci224_ao_munge(struct comedi_device *dev, struct comedi_subdevice *s,
/* The hardware expects 16-bit numbers. */
shift = 16 - thisboard->ao_bits;
/* Channels will be all bipolar or all unipolar. */
- if ((devpriv->hwrange[CR_RANGE(async->cmd.chanlist[0])] &
+ if ((devpriv->hwrange[CR_RANGE(cmd->chanlist[0])] &
PCI224_DACCON_POLAR_MASK) == PCI224_DACCON_POLAR_UNI) {
/* Unipolar */
offset = 0;
OpenPOWER on IntegriCloud