]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: adc: xilinx-xadc: assign auxiliary channels address correctly
authorSubbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
Sun, 9 Nov 2014 09:55:00 +0000 (09:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:41:04 +0000 (13:41 -0700)
commit 1887e724e2b6df06847522fe9dc2ab53639516cc upstream.

This patch fixes incorrect logic for assigning address
to auxiliary channels of xilinx xadc.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/xilinx-xadc-core.c

index ab52be29141bb285b2a96d7bf970e420ddb08a57..41d3a5efd62c7a0252652f6e3f0a7957b8963c47 100644 (file)
@@ -1126,7 +1126,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np,
                                chan->address = XADC_REG_VPVN;
                        } else {
                                chan->scan_index = 15 + reg;
-                               chan->scan_index = XADC_REG_VAUX(reg - 1);
+                               chan->address = XADC_REG_VAUX(reg - 1);
                        }
                        num_channels++;
                        chan++;