diff options
author | Robert Hancock <[email protected]> | 2022-01-27 11:34:48 -0600 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2022-03-02 13:38:48 +0000 |
commit | 1f21a41578062d439cc485bce2d8b664f9a6170e (patch) | |
tree | b01fc7d535126112ffb21b903008b58ae3927c64 | |
parent | 5165102efa41c2aedc77441612f4506a8a8671db (diff) |
iio: adc: xilinx-ams: Fixed missing PS channels
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 <[email protected]>
Reviewed-by: Michael Tretter <[email protected]>
Acked-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r-- | drivers/iio/adc/xilinx-ams.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |