media: atomisp: gmin: Use str_on_off() helper
Subsystems (4)
PATCH v3 1/1 media: atomisp: gmin: Use str_on_off() helper
Replace the open-coded "on" : "off" ternary with the standard str_on_off() helper from <linux/string_choices.h>. This improves readability and reuses the kernel's existing string helper instead of duplicating the literals.
No functional change intended.
Signed-off-by Mert Seftali <[email protected]>
Reviewed-by Kees Cook <[email protected]>
Reviewed-by Andy Shevchenko <[email protected]>
---
Changes in v3:
- Collect Reviewed-by tag from Kees Cook.
- No code changes since v2.
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +4 -3
@@ -13,6 +13,8 @@#include <linux/gpio/consumer.h> #include <linux/gpio.h> #include <linux/platform_device.h> +#include <linux/string_choices.h> +#include "../../include/linux/atomisp_platform.h" #include "../../include/linux/atomisp_gmin_platform.h"
@@ -916,8 +918,7 @@ static int gmin_acpi_pm_ctrl(struct v4l2_subdev *subdev, int on)if (gs->clock_on == on)return 0 ; -dev_dbg (subdev->dev,"Setting power state to %s\n" , - on ?"on" :"off" ); +dev_dbg (subdev->dev,"Setting power state to %s\n" ,str_on_off (on));if (on) ret = acpi_device_set_power(adev,
@@ -930,7 +931,7 @@ static int gmin_acpi_pm_ctrl(struct v4l2_subdev *subdev, int on) 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; }
Signature · 1 line
2.54.0