summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2021-08-15 00:17:03 +0300
committerYury Norov <yury.norov@gmail.com>2022-01-15 19:47:31 +0300
commitb5c7e7ec7d3418af2544452b45cc67297c857a86 (patch)
tree1b2d0bd3d0852b65d73b65982d4b8f69c27703e7 /drivers/iio
parent93ba139ba8190c33009c5353ca43c8519443f467 (diff)
downloadlinux-b5c7e7ec7d3418af2544452b45cc67297c857a86.tar.xz
all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
find_first{,_zero}_bit is a more effective analogue of 'next' version if start == 0. This patch replaces 'next' with 'first' where things look trivial. Signed-off-by: Yury Norov <yury.norov@gmail.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/ad7124.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c
index e45c600fccc0..bc2cfa5f9592 100644
--- a/drivers/iio/adc/ad7124.c
+++ b/drivers/iio/adc/ad7124.c
@@ -347,7 +347,7 @@ static int ad7124_find_free_config_slot(struct ad7124_state *st)
{
unsigned int free_cfg_slot;
- free_cfg_slot = find_next_zero_bit(&st->cfg_slots_status, AD7124_MAX_CONFIGS, 0);
+ free_cfg_slot = find_first_zero_bit(&st->cfg_slots_status, AD7124_MAX_CONFIGS);
if (free_cfg_slot == AD7124_MAX_CONFIGS)
return -1;