ACPI: video: Use str_yes_no() helper in acpi_video_bus_add()
PATCH RESEND 1/1 ACPI: video: Use str_yes_no() helper in acpi_video_bus_add()
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/acpi/acpi_video.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/acpi/acpi_video.c +4 -3
@@ -27,6 +27,7 @@#include <linux/acpi.h> #include <acpi/video.h> #include <linux/uaccess.h> +#include <linux/string_choices.h> #define ACPI_VIDEO_BUS_NAME "Video Bus"#define ACPI_VIDEO_DEVICE_NAME "Video Device"
@@ -2039,9 +2040,9 @@ static int acpi_video_bus_add(struct acpi_device *device)pr_info ("%s [%s] (multi-head: %s rom: %s post: %s)\n" ,ACPI_VIDEO_DEVICE_NAME ,acpi_device_bid (device), - video->flags.multihead ?"yes" :"no" , - video->flags.rom ?"yes" :"no" , - video->flags.post ?"yes" :"no" ); +str_yes_no (video->flags.multihead), +str_yes_no (video->flags.rom), +str_yes_no (video->flags.post));mutex_lock (&video_list_lock);list_add_tail (&video->entry, &video_bus_head);mutex_unlock (&video_list_lock);
Signature · 1 line
2.48.1
Rafael J. Wysocki
maintainerQuoted 24 lines · Thorsten Blum
Remove hard-coded strings by using the
str_yes_no()helper function.Signed-off-by Thorsten Blum <[email protected]>--- drivers/acpi/acpi_video.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/acpi/acpi_video.c +1
-0@@ -27,6 +27,7 @@#include <linux/acpi.h> #include <acpi/video.h> #include <linux/uaccess.h> +#include <linux/string_choices.h> #define ACPI_VIDEO_BUS_NAME "Video Bus"#define ACPI_VIDEO_DEVICE_NAME "Video Device"@@ -2039,9 +2040,9 @@ static int acpi_video_bus_add(struct acpi_device *device) pr_info("%s [%s] (multi-head: %s rom: %s post: %s)\n", ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
drivers/acpi/acpi_video.c static int acpi_video_bus_add(struct acpi_device *device)
Quoted 10 lines
drivers/acpi/acpi_video.c +3
-4- video->flags.multihead ?"yes" :"no" , - video->flags.rom ?"yes" :"no" , - video->flags.post ? "yes" : "no"); +str_yes_no (video->flags.multihead), +str_yes_no (video->flags.rom), + str_yes_no(video->flags.post));mutex_lock (&video_list_lock);list_add_tail (&video->entry, &video_bus_head);mutex_unlock (&video_list_lock); --
Applied with changelog edits as 6.15 material, thanks!