Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: Use string choices helpers

Use string_choices.h helpers instead of hard-coded strings.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Chelsy Ratnawat and committed by
Helge Deller
c7d655ef aad1d99b

+8 -5
+4 -3
drivers/video/fbdev/core/fbmon.c
··· 36 36 #include <video/of_videomode.h> 37 37 #include <video/videomode.h> 38 38 #include "../edid.h" 39 + #include <linux/string_choices.h> 39 40 40 41 /* 41 42 * EDID parser ··· 321 320 if (flags & DPMS_STANDBY) 322 321 specs->dpms |= FB_DPMS_STANDBY; 323 322 DPRINTK(" DPMS: Active %s, Suspend %s, Standby %s\n", 324 - (flags & DPMS_ACTIVE_OFF) ? "yes" : "no", 325 - (flags & DPMS_SUSPEND) ? "yes" : "no", 326 - (flags & DPMS_STANDBY) ? "yes" : "no"); 323 + str_yes_no(flags & DPMS_ACTIVE_OFF), 324 + str_yes_no(flags & DPMS_SUSPEND), 325 + str_yes_no(flags & DPMS_STANDBY)); 327 326 } 328 327 329 328 static void get_chroma(unsigned char *block, struct fb_monspecs *specs)
+2 -1
drivers/video/fbdev/nvidia/nvidia.c
··· 22 22 #include <linux/pci.h> 23 23 #include <linux/console.h> 24 24 #include <linux/backlight.h> 25 + #include <linux/string_choices.h> 25 26 #ifdef CONFIG_BOOTX_TEXT 26 27 #include <asm/btext.h> 27 28 #endif ··· 623 622 else 624 623 par->FPDither = !!(NV_RD32(par->PRAMDAC, 0x083C) & 1); 625 624 printk(KERN_INFO PFX "Flat panel dithering %s\n", 626 - par->FPDither ? "enabled" : "disabled"); 625 + str_enabled_disabled(par->FPDither)); 627 626 } 628 627 629 628 info->fix.visual = (info->var.bits_per_pixel == 8) ?
+2 -1
drivers/video/fbdev/pxafb.c
··· 60 60 #include <linux/soc/pxa/cpu.h> 61 61 #include <video/of_display_timing.h> 62 62 #include <video/videomode.h> 63 + #include <linux/string_choices.h> 63 64 64 65 #include <asm/io.h> 65 66 #include <asm/irq.h> ··· 1420 1419 1421 1420 if (ret < 0) 1422 1421 pr_warn("Unable to %s LCD supply regulator: %d\n", 1423 - on ? "enable" : "disable", ret); 1422 + str_enable_disable(on), ret); 1424 1423 else 1425 1424 fbi->lcd_supply_enabled = on; 1426 1425 }