9
0
Fork 0

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 <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2017-03-09 10:57:21 +01:00 committed by Sascha Hauer
parent f8f3f26f8b
commit f210382b3f
1 changed files with 4 additions and 2 deletions

View File

@ -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);