Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9af39b31 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71ba7506
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;