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@xxxxxxxxxx> Reviewed-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx> Acked-by: Michal Simek <michal.simek@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220127173450.3684318-3-robert.hancock@xxxxxxxxxx Cc: <Stable@xxxxxxxxxxxxxxx> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> --- drivers/iio/adc/xilinx-ams.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index 6ffddf4038b8..6746bc966bfd 100644 --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -1225,6 +1225,7 @@ static int ams_init_module(struct iio_dev *indio_dev, /* 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); -- 2.35.1