[PATCH] staging: media: atomisp: use str_on_off() helper
From: Giorgi Tchankvetadze
Date: Fri Feb 20 2026 - 09:46:43 EST
Replace the ternary operator with str_on_off() for printing
"on"/"off" strings. This improves readability and follows the
kernel's preferred style. Also add the required header
<linux/string_choices.h> to provide the helper.
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx>
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index 900a67552d6a..d573eab05e1c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -10,6 +10,7 @@
#include <linux/pci.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
+#include <linux/string_choices.h>
#include <linux/pm_qos.h>
#include <linux/timer.h>
#include <linux/delay.h>
@@ -527,7 +528,7 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
u32 val = enable ? MRFLD_ISPSSPM0_IUNIT_POWER_ON :
MRFLD_ISPSSPM0_IUNIT_POWER_OFF;
- dev_dbg(isp->dev, "IUNIT power-%s.\n", enable ? "on" : "off");
+ dev_dbg(isp->dev, "IUNIT power-%s.\n", str_on_off(enable));
/* WA for P-Unit, if DVFS enabled, ISP timeout observed */
if (IS_CHT && enable && !isp->pm_only) {
@@ -569,7 +570,7 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
usleep_range(100, 150);
} while (1);
- dev_err(isp->dev, "IUNIT power-%s timeout.\n", enable ? "on" : "off");
+ dev_err(isp->dev, "IUNIT power-%s timeout.\n", str_on_off(enable));
return -EBUSY;
}
--
2.52.0