struct video_priv *priv = dev_get_uclass_priv(dev);
switch (priv->bpix) {
-#ifdef CONFIG_VIDEO_BPP16
- case VIDEO_BPP16: {
- u16 *ppix = priv->fb;
- u16 *end = priv->fb + priv->fb_size;
-
- while (ppix < end)
- *ppix++ = priv->colour_bg;
- break;
- }
-#endif
-#ifdef CONFIG_VIDEO_BPP32
- case VIDEO_BPP32: {
- u32 *ppix = priv->fb;
- u32 *end = priv->fb + priv->fb_size;
-
- while (ppix < end)
- *ppix++ = priv->colour_bg;
- break;
- }
-#endif
+ case VIDEO_BPP16:
+ if (IS_ENABLED(CONFIG_VIDEO_BPP16)) {
+ u16 *ppix = priv->fb;
+ u16 *end = priv->fb + priv->fb_size;
+
+ while (ppix < end)
+ *ppix++ = priv->colour_bg;
+ break;
+ }
+ case VIDEO_BPP32:
+ if (IS_ENABLED(CONFIG_VIDEO_BPP32)) {
+ u32 *ppix = priv->fb;
+ u32 *end = priv->fb + priv->fb_size;
+
+ while (ppix < end)
+ *ppix++ = priv->colour_bg;
+ break;
+ }
default:
memset(priv->fb, priv->colour_bg, priv->fb_size);
break;
struct video_priv *priv = dev_get_uclass_priv(dev);
int fore, back;
-#ifdef CONFIG_SYS_WHITE_ON_BLACK
- /* White is used when switching to bold, use light gray here */
- fore = VID_LIGHT_GRAY;
- back = VID_BLACK;
-#else
- fore = VID_BLACK;
- back = VID_WHITE;
-#endif
+ if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) {
+ /* White is used when switching to bold, use light gray here */
+ fore = VID_LIGHT_GRAY;
+ back = VID_BLACK;
+ } else {
+ fore = VID_BLACK;
+ back = VID_WHITE;
+ }
if (invert) {
int temp;