iio: Use str_enable_disable-like helpers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 14 Jan 2025 19:27:16 +0000 (20:27 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 3 Feb 2025 19:15:37 +0000 (19:15 +0000)
commit465c79ad0665fc647c7643b1fd9bdfecf199f627
tree1f11977516f419a13ef9137adec7095ea16423af
parent8ec5a6fc3b58a91635b8c514c7bed4ecf7c60dd2
iio: Use str_enable_disable-like helpers

Replace ternary (condition ? "enable" : "disable") syntax with helpers
from string_choices.h because:
1. Simple function call with one argument is easier to read.  Ternary
   operator has three arguments and with wrapping might lead to quite
   long code.
2. Is slightly shorter thus also easier to read.
3. It brings uniformity in the text - same string.
4. Allows deduping by the linker, which results in a smaller binary
   file.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250114192716.912476-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/humidity/dht11.c
drivers/iio/proximity/irsd200.c