summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-12-29 14:51:19 +0100
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-12-29 14:52:19 +0100
commitc18bde85706ddbd7ad1e130498b26d33a3733371 (patch)
treede0fd74350f019e3319d82eb78ec9292ef13e0b3
parent548d6800fad6b55086addc8450d1f243a9167f35 (diff)
auxdisplay: arm-charlcd: Remove redundant ternary operators
For ternary operators in the form of a ? true : false, if a itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/auxdisplay/arm-charlcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c
index 7395a6dd6dc9..30fd2341c628 100644
--- a/drivers/auxdisplay/arm-charlcd.c
+++ b/drivers/auxdisplay/arm-charlcd.c
@@ -157,7 +157,8 @@ static bool charlcd_4bit_read_bf(struct charlcd *lcd)
writel(0x01, lcd->virtbase + CHAR_MASK);
}
readl(lcd->virtbase + CHAR_COM);
- return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG ? true : false;
+
+ return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG;
}
static void charlcd_4bit_wait_busy(struct charlcd *lcd)