]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: proximity: rfd77402: Use kernel helper for result polling
authorShrikant Raskar <raskar.shree97@gmail.com>
Wed, 28 Jan 2026 17:51:50 +0000 (23:21 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 29 Jan 2026 17:47:56 +0000 (17:47 +0000)
commit51eedb3a323ae87872c4cb60cc6abed696b0a822
treec13e06fba2148156e2dca74ed396f28a04632c9b
parent36bff1842330b3eddaf5a7977eb00a724fc42c27
iio: proximity: rfd77402: Use kernel helper for result polling

Replace the manually written polling loop with read_poll_timeout(),
the kernel's standard helper for waiting on hardware status.This
makes the code easier to read.

Move the polling logic into a dedicated helper function, as it will
be reused by future updates.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/rfd77402.c