iio: core: use INDIO_ALL_BUFFER_MODES in iio_buffer_enabled()
authorDavid Lechner <dlechner@baylibre.com>
Mon, 8 Jan 2024 20:06:44 +0000 (14:06 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 23 Jan 2024 22:06:56 +0000 (22:06 +0000)
commite7748c17bda04758a01f1241896b553f8b3873cc
tree6de384db9920e718b7881e129aaa4f3994263a3f
parent66b5591697294171b7e574b7e253a0d7ecce99dd
iio: core: use INDIO_ALL_BUFFER_MODES in iio_buffer_enabled()

This replaces use of individual buffer mode flags with
INDIO_ALL_BUFFER_MODES in the iio_buffer_enabled() function.

This simplifies the code and makes it robust in case of the addition of
new buffer modes.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240108200647.3916681-1-dlechner@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c