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:
parent
f8f3f26f8b
commit
f210382b3f
|
@ -96,7 +96,8 @@ int fb_enable(struct fb_info *info)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
info->fbops->fb_enable(info);
|
if (info->fbops->fb_enable)
|
||||||
|
info->fbops->fb_enable(info);
|
||||||
|
|
||||||
info->enabled = true;
|
info->enabled = true;
|
||||||
|
|
||||||
|
@ -108,7 +109,8 @@ int fb_disable(struct fb_info *info)
|
||||||
if (!info->enabled)
|
if (!info->enabled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
info->fbops->fb_disable(info);
|
if (info->fbops->fb_disable)
|
||||||
|
info->fbops->fb_disable(info);
|
||||||
|
|
||||||
fb_release_shadowfb(info);
|
fb_release_shadowfb(info);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue