[PATCH 06/12] media: tda1997x: use string_choices helper

From: Balakrishnan Sambath

Date: Wed May 27 2026 - 10:46:16 EST


Replace open-coded boolean-to-string ternaries with the standard
helpers from <linux/string_choices.h>.

No functional change.

Signed-off-by: Balakrishnan Sambath <balakrishnan.s@xxxxxxxxxxxxx>
---
drivers/media/i2c/tda1997x.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index afa1d6f34..d509d26ba 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -12,6 +12,7 @@
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
+#include <linux/string_choices.h>
#include <linux/types.h>
#include <linux/v4l2-dv-timings.h>
#include <linux/videodev2.h>
@@ -1969,13 +1970,13 @@ static int tda1997x_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "-----Chip status-----\n");
v4l2_info(sd, "Chip: %s N%d\n", state->info->name,
state->chip_revision + 1);
- v4l2_info(sd, "EDID Enabled: %s\n", state->edid.present ? "yes" : "no");
+ v4l2_info(sd, "EDID Enabled: %s\n", str_yes_no(state->edid.present));

v4l2_info(sd, "-----Signal status-----\n");
v4l2_info(sd, "Cable detected (+5V power): %s\n",
- tda1997x_detect_tx_5v(sd) ? "yes" : "no");
+ str_yes_no(tda1997x_detect_tx_5v(sd)));
v4l2_info(sd, "HPD detected: %s\n",
- tda1997x_detect_tx_hpd(sd) ? "yes" : "no");
+ str_yes_no(tda1997x_detect_tx_hpd(sd)));

v4l2_info(sd, "-----Video Timings-----\n");
switch (tda1997x_detect_std(state, &timings)) {

--
2.34.1