Skip to content

Commit 31c2e10

Browse files
lidongjsxstorulf
authored andcommitted
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>
1 parent b93d8b1 commit 31c2e10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mmc/host/atmel-mci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <asm/cacheflush.h>
3939
#include <asm/io.h>
4040
#include <linux/unaligned.h>
41+
#include <linux/string_choices.h>
4142

4243
#define ATMCI_MAX_NR_SLOTS 2
4344

@@ -2264,7 +2265,7 @@ static int atmci_init_slot(struct atmel_mci *host,
22642265
"slot[%u]: bus_width=%u, detect_pin=%d, "
22652266
"detect_is_active_high=%s, wp_pin=%d\n",
22662267
id, slot_data->bus_width, desc_to_gpio(slot_data->detect_pin),
2267-
!gpiod_is_active_low(slot_data->detect_pin) ? "true" : "false",
2268+
str_true_false(!gpiod_is_active_low(slot_data->detect_pin)),
22682269
desc_to_gpio(slot_data->wp_pin));
22692270

22702271
mmc->ops = &atmci_ops;

0 commit comments

Comments
 (0)