[PATCH 04/12] media: vpx3220: use string_choices helper

From: Balakrishnan Sambath

Date: Wed May 27 2026 - 10:44:39 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/vpx3220.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/vpx3220.c b/drivers/media/i2c/vpx3220.c
index 29bcbb5a5..881129d67 100644
--- a/drivers/media/i2c/vpx3220.c
+++ b/drivers/media/i2c/vpx3220.c
@@ -8,6 +8,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
+#include <linux/string_choices.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
@@ -401,7 +402,7 @@ static int vpx3220_s_routing(struct v4l2_subdev *sd,

static int vpx3220_s_stream(struct v4l2_subdev *sd, int enable)
{
- v4l2_dbg(1, debug, sd, "s_stream %s\n", enable ? "on" : "off");
+ v4l2_dbg(1, debug, sd, "s_stream %s\n", str_on_off(enable));

vpx3220_write(sd, 0xf2, (enable ? 0x1b : 0x00));
return 0;

--
2.34.1