diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-01-14 13:40:22 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-01-14 13:41:41 -0800 |
| commit | 7ef9bdec9a22ad48a76e0c446d54b2274eaf2fca (patch) | |
| tree | 57619be804c4b21484ebeac9459d470ed4675a6b /drivers/input/touchscreen | |
| parent | Input: use guard notation in input core (diff) | |
| download | linux-7ef9bdec9a22ad48a76e0c446d54b2274eaf2fca.tar.gz linux-7ef9bdec9a22ad48a76e0c446d54b2274eaf2fca.zip | |
Input: 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://lore.kernel.org/r/20250114192701.912430-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/egalax_ts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index f4e950920e84..eb3cc2befcdf 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -23,6 +23,7 @@ #include <linux/gpio/consumer.h> #include <linux/delay.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include <linux/bitops.h> #include <linux/input/mt.h> @@ -102,7 +103,7 @@ static irqreturn_t egalax_ts_interrupt(int irq, void *dev_id) input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, down); dev_dbg(&client->dev, "%s id:%d x:%d y:%d z:%d", - down ? "down" : "up", id, x, y, z); + str_down_up(down), id, x, y, z); if (down) { input_report_abs(input_dev, ABS_MT_POSITION_X, x); |
