[PATCH 01/12] media: max9286: use string_choices helper
From: Balakrishnan Sambath
Date: Wed May 27 2026 - 10:41:05 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/max9286.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index ac0712ce1..e2954ed26 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -22,6 +22,7 @@
#include <linux/of_graph.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
@@ -1330,7 +1331,7 @@ static int max9286_poc_enable(struct max9286_priv *priv, bool enable)
if (ret < 0)
dev_err(&priv->client->dev, "Unable to turn power %s\n",
- enable ? "on" : "off");
+ str_on_off(enable));
return ret;
}
--
2.34.1