Skip to content

Commit c7d655e

Browse files
ChelsyRatnawathdeller
authored andcommitted
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>
1 parent aad1d99 commit c7d655e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/video/fbdev/core/fbmon.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <video/of_videomode.h>
3737
#include <video/videomode.h>
3838
#include "../edid.h"
39+
#include <linux/string_choices.h>
3940

4041
/*
4142
* EDID parser
@@ -320,9 +321,9 @@ static void get_dpms_capabilities(unsigned char flags,
320321
if (flags & DPMS_STANDBY)
321322
specs->dpms |= FB_DPMS_STANDBY;
322323
DPRINTK(" DPMS: Active %s, Suspend %s, Standby %s\n",
323-
(flags & DPMS_ACTIVE_OFF) ? "yes" : "no",
324-
(flags & DPMS_SUSPEND) ? "yes" : "no",
325-
(flags & DPMS_STANDBY) ? "yes" : "no");
324+
str_yes_no(flags & DPMS_ACTIVE_OFF),
325+
str_yes_no(flags & DPMS_SUSPEND),
326+
str_yes_no(flags & DPMS_STANDBY));
326327
}
327328

328329
static void get_chroma(unsigned char *block, struct fb_monspecs *specs)

drivers/video/fbdev/nvidia/nvidia.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/pci.h>
2323
#include <linux/console.h>
2424
#include <linux/backlight.h>
25+
#include <linux/string_choices.h>
2526
#ifdef CONFIG_BOOTX_TEXT
2627
#include <asm/btext.h>
2728
#endif
@@ -622,7 +623,7 @@ static int nvidiafb_set_par(struct fb_info *info)
622623
else
623624
par->FPDither = !!(NV_RD32(par->PRAMDAC, 0x083C) & 1);
624625
printk(KERN_INFO PFX "Flat panel dithering %s\n",
625-
par->FPDither ? "enabled" : "disabled");
626+
str_enabled_disabled(par->FPDither));
626627
}
627628

628629
info->fix.visual = (info->var.bits_per_pixel == 8) ?

drivers/video/fbdev/pxafb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#include <linux/soc/pxa/cpu.h>
6161
#include <video/of_display_timing.h>
6262
#include <video/videomode.h>
63+
#include <linux/string_choices.h>
6364

6465
#include <asm/io.h>
6566
#include <asm/irq.h>
@@ -1419,7 +1420,7 @@ static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
14191420

14201421
if (ret < 0)
14211422
pr_warn("Unable to %s LCD supply regulator: %d\n",
1422-
on ? "enable" : "disable", ret);
1423+
str_enable_disable(on), ret);
14231424
else
14241425
fbi->lcd_supply_enabled = on;
14251426
}

0 commit comments

Comments
 (0)