summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Dong <lidong@vivo.com>2025-06-20 12:35:17 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2025-07-03 12:35:17 +0200
commit31c2e10cecc48a90da09670893d91ecf6b6a8917 (patch)
tree86ce1f98c51cd4647f39c8a9f3c3531956f06f58
parentb93d8b1cab299bc76f574f9e3cb8aafcfafc0037 (diff)
downloadlinux-31c2e10cecc48a90da09670893d91ecf6b6a8917.tar.gz
linux-31c2e10cecc48a90da09670893d91ecf6b6a8917.zip
mmc: Convert ternary operator to str_true_false() helper
Replace direct ternary condition check with existing helper function str_true_false() to improve code readability and maintain consistency. Signed-off-by: Li Dong <lidong@vivo.com> Link: https://lore.kernel.org/r/20250620043517.172705-1-lidong@vivo.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/atmel-mci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index c885c04e938a..381944dc7499 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -38,6 +38,7 @@
#include <asm/cacheflush.h>
#include <asm/io.h>
#include <linux/unaligned.h>
+#include <linux/string_choices.h>
#define ATMCI_MAX_NR_SLOTS 2
@@ -2264,7 +2265,7 @@ static int atmci_init_slot(struct atmel_mci *host,
"slot[%u]: bus_width=%u, detect_pin=%d, "
"detect_is_active_high=%s, wp_pin=%d\n",
id, slot_data->bus_width, desc_to_gpio(slot_data->detect_pin),
- !gpiod_is_active_low(slot_data->detect_pin) ? "true" : "false",
+ str_true_false(!gpiod_is_active_low(slot_data->detect_pin)),
desc_to_gpio(slot_data->wp_pin));
mmc->ops = &atmci_ops;