[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220405070408.556854294@linuxfoundation.org>
Date: Tue, 5 Apr 2022 09:13:01 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Robert Hancock <robert.hancock@...ian.com>,
Michael Tretter <m.tretter@...gutronix.de>,
Michal Simek <michal.simek@...inx.com>, Stable@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH 5.17 0034/1126] iio: adc: xilinx-ams: Fixed missing PS channels
From: Robert Hancock <robert.hancock@...ian.com>
commit 1f21a41578062d439cc485bce2d8b664f9a6170e upstream.
The code forgot to increment num_channels for the PS channel inputs,
resulting in them not being enabled as they should.
Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Robert Hancock <robert.hancock@...ian.com>
Reviewed-by: Michael Tretter <m.tretter@...gutronix.de>
Acked-by: Michal Simek <michal.simek@...inx.com>
Link: https://lore.kernel.org/r/20220127173450.3684318-3-robert.hancock@calian.com
Cc: <Stable@...r.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/iio/adc/xilinx-ams.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/iio/adc/xilinx-ams.c
+++ b/drivers/iio/adc/xilinx-ams.c
@@ -1230,6 +1230,7 @@ static int ams_init_module(struct iio_de
/* add PS channels to iio device channels */
memcpy(channels, ams_ps_channels, sizeof(ams_ps_channels));
+ num_channels = ARRAY_SIZE(ams_ps_channels);
} else if (fwnode_property_match_string(fwnode, "compatible",
"xlnx,zynqmp-ams-pl") == 0) {
ams->pl_base = fwnode_iomap(fwnode, 0);
Powered by blists - more mailing lists