From f210382b3f698d0829db12b28f409862c7e504f8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 9 Mar 2017 10:57:21 +0100 Subject: [PATCH] video: make enable/disable ops optional Some framebuffers cannot be enabled/disabled, so make the corresponding ops optional. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- drivers/video/fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/fb.c b/drivers/video/fb.c index b6f87e47c..004df1e60 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -96,7 +96,8 @@ int fb_enable(struct fb_info *info) if (ret) return ret; - info->fbops->fb_enable(info); + if (info->fbops->fb_enable) + info->fbops->fb_enable(info); info->enabled = true; @@ -108,7 +109,8 @@ int fb_disable(struct fb_info *info) if (!info->enabled) return 0; - info->fbops->fb_disable(info); + if (info->fbops->fb_disable) + info->fbops->fb_disable(info); fb_release_shadowfb(info);