Use string_choices.h helpers instead of hard-coded strings.
Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
#include <linux/io.h>
#include <linux/pm_runtime.h>
+#include <linux/string_choices.h>
/* Assume max number of ACC stages */
#define MAX_ACC_STAGES 20
{
dev_dbg(isp->dev, "%s: css irq info 0x%08x: %s (%d).\n",
__func__, info,
- enable ? "enable" : "disable", enable);
+ str_enable_disable(enable), enable);
if (ia_css_irq_enable(info, enable)) {
dev_warn(isp->dev, "%s:Invalid irq info: 0x%08x when %s.\n",
__func__, info,
#include <linux/regulator/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
+#include <linux/string_choices.h>
#include "../../include/linux/atomisp_platform.h"
#include "../../include/linux/atomisp_gmin_platform.h"
return 0;
dev_dbg(subdev->dev, "Setting power state to %s\n",
- on ? "on" : "off");
+ str_on_off(on));
if (on)
ret = acpi_device_set_power(adev,
gs->clock_on = on;
else
dev_err(subdev->dev, "Couldn't set power state to %s\n",
- on ? "on" : "off");
+ str_on_off(on));
return ret;
}
#include <linux/dmi.h>
#include <linux/interrupt.h>
#include <linux/bits.h>
+#include <linux/string_choices.h>
#include <media/v4l2-fwnode.h>
#include <asm/iosf_mbi.h>
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) {
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;
}
*/
#include <linux/math.h>
+#include <linux/string_choices.h>
#include <math_support.h>
#include <gdc_device.h> /* HR_GDC_N */
dev_dbg(atomisp_dev, "Using binary %s (id %d), type %d, mode %d, continuous %s\n",
xcandidate->blob->name, xcandidate->sp.id, xcandidate->type,
xcandidate->sp.pipeline.mode,
- xcandidate->sp.enable.continuous ? "true" : "false");
+ str_true_false(xcandidate->sp.enable.continuous));
if (err)
dev_err(atomisp_dev, "Failed to find a firmware binary matching the pipeline parameters\n");
/*! \file */
#include <linux/mm.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <linux/vmalloc.h>
#include "hmm.h"
enum ia_css_pipe_id pipe_id;
IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
- stream, map ? "true" : "false");
+ stream, str_true_false(map));
if (!stream) {
IA_CSS_LEAVE_ERR_PRIVATE(-EINVAL);