diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 23:48:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 23:48:16 +0300 |
commit | d4ab5487cc77a4053dc9070c5761ad94bf397825 (patch) | |
tree | cd69e85b7cc3f45f10c3cf402c8a497be8da3944 /drivers/iio/adc/ti-tsc2046.c | |
parent | c2faf737abfb10f88f2d2612d573e9edc3c42c37 (diff) | |
parent | 7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 (diff) | |
download | linux-d4ab5487cc77a4053dc9070c5761ad94bf397825.tar.xz |
Merge 5.17-rc6 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/ti-tsc2046.c')
-rw-r--r-- | drivers/iio/adc/ti-tsc2046.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c index d84ae6b008c1..e8fc4d01f30b 100644 --- a/drivers/iio/adc/ti-tsc2046.c +++ b/drivers/iio/adc/ti-tsc2046.c @@ -388,7 +388,7 @@ static int tsc2046_adc_update_scan_mode(struct iio_dev *indio_dev, mutex_lock(&priv->slock); size = 0; - for_each_set_bit(ch_idx, active_scan_mask, indio_dev->num_channels) { + for_each_set_bit(ch_idx, active_scan_mask, ARRAY_SIZE(priv->l)) { size += tsc2046_adc_group_set_layout(priv, group, ch_idx); tsc2046_adc_group_set_cmd(priv, group, ch_idx); group++; @@ -548,7 +548,7 @@ static int tsc2046_adc_setup_spi_msg(struct tsc2046_adc_priv *priv) * enabled. */ size = 0; - for (ch_idx = 0; ch_idx < priv->dcfg->num_channels; ch_idx++) + for (ch_idx = 0; ch_idx < ARRAY_SIZE(priv->l); ch_idx++) size += tsc2046_adc_group_set_layout(priv, ch_idx, ch_idx); priv->tx = devm_kzalloc(&priv->spi->dev, size, GFP_KERNEL); |