summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-10 14:15:24 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-12 11:10:51 +0100
commitdc6fa31dd7b294f586a07d5929ae3765ddbf86f3 (patch)
tree615c3f86cae0d58fb48b78477b4aa08624572f35
parentbc7fef9db6f8fb10c1c947158763cd22399bd421 (diff)
video: fbdev: mxsfb: fix build with disabled overlay support
This fixes building with disabled CONFIG_FB_MXC_OVERLAY. Fixes: dffeff8e10a6 ("MLK-22304-2 fbdev: mxsfb: fix build warnings if CONFIG_PM_SLEEP off") Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/video/fbdev/mxsfb.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c
index 05000ac1a43e..e0e629505bb1 100644
--- a/drivers/video/fbdev/mxsfb.c
+++ b/drivers/video/fbdev/mxsfb.c
@@ -478,7 +478,7 @@ static const struct fb_bitfield def_rgb444[] = {
.length = 0,
}
};
-#endif
+#endif /* CONFIG_FB_MXC_OVERLAY */
static const struct fb_bitfield def_rgb666[] = {
[RED] = {
@@ -2246,11 +2246,16 @@ static void mxsfb_overlay_suspend(struct mxsfb_info *fbi)
clk_disable_pix(fbi);
}
}
-#endif
+#endif /* CONFIG_PM_SLEEP */
-#else
+#else /* CONFIG_FB_MXC_OVERLAY */
static void mxsfb_overlay_init(struct mxsfb_info *fbi) {}
static void mxsfb_overlay_exit(struct mxsfb_info *fbi) {}
+#endif /* CONFIG_FB_MXC_OVERLAY */
+
+#if !(defined(CONFIG_FB_MXC_OVERLAY) && defined(CONFIG_PM_SLEEP))
+static void mxsfb_overlay_resume(struct mxsfb_info *fbi) {}
+static void mxsfb_overlay_suspend(struct mxsfb_info *fbi) {}
#endif
static int mxsfb_probe(struct platform_device *pdev)
@@ -2501,7 +2506,7 @@ static int mxsfb_runtime_resume(struct device *dev)
return 0;
}
-#endif
+#endif /* CONFIG_PM */
#ifdef CONFIG_PM_SLEEP
static int mxsfb_suspend(struct device *pdev)
@@ -2540,7 +2545,7 @@ static int mxsfb_resume(struct device *pdev)
return 0;
}
-#endif
+#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops mxsfb_pm_ops = {
SET_RUNTIME_PM_OPS(mxsfb_runtime_suspend, mxsfb_runtime_resume, NULL)