]> Gentwo Git Trees - linux/.git/commit
iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask
authorSean Anderson <sean.anderson@linux.dev>
Mon, 11 Mar 2024 16:28:00 +0000 (12:28 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 8 Jun 2024 17:26:57 +0000 (18:26 +0100)
commit89b898c627a49b978a4c323ea6856eacfc21f6ba
treedbba13b3dee31f55ee848b5150734e2a5892f784
parent8f40af31971ce012c0a4b13444900aed3f708edf
iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask

ams_enable_channel_sequence constructs a "scan_mask" for all the PS and
PL channels. This works out fine, since scan_index for these channels is
less than 64. However, it also includes the ams_ctrl_channels, where
scan_index is greater than 64, triggering undefined behavior. Since we
don't need these channels anyway, just exclude them.

Fixes: d5c70627a794 ("iio: adc: Add Xilinx AMS driver")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240311162800.11074-1-sean.anderson@linux.dev
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/xilinx-ams.c