diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2017-03-09 10:57:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-10 08:12:11 +0100 |
commit | f210382b3f698d0829db12b28f409862c7e504f8 (patch) | |
tree | f976c539ef0659faaa234118f27e30bd399af0d5 | |
parent | f8f3f26f8bb319146bdd6b5c6282f5e98e65dd88 (diff) | |
download | barebox-f210382b3f698d0829db12b28f409862c7e504f8.tar.gz barebox-f210382b3f698d0829db12b28f409862c7e504f8.tar.xz |
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>
-rw-r--r-- | drivers/video/fb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c index b6f87e47c6..004df1e604 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); |