]> rtime.felk.cvut.cz Git - zynq/linux.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)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 1 Oct 2014 05:54:03 +0000 (07:54 +0200)
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>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/xilinx-xadc-core.c

index aef479a25412fc1c46fa1eeca11012c6005574e3..3005dee8c6585f9828d9957851a2ada8aeb9bb20 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++;