summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-03-10 08:07:23 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-10 08:07:25 +0100
commitf8f3f26f8bb319146bdd6b5c6282f5e98e65dd88 (patch)
treee6c581a3151d0e72d347d8b2b24219c8467d8163 /drivers
parent52e9a842e3bc9b3e6f48a6eee0020c48dcbb87c5 (diff)
downloadbarebox-f8f3f26f8bb319146bdd6b5c6282f5e98e65dd88.tar.gz
barebox-f8f3f26f8bb319146bdd6b5c6282f5e98e65dd88.tar.xz
video: call fb_[en|dis]able instead of fops directly
We have fb_enable and fb_disable which handle enabling of a framebuffer, so use it instead of calling into the ops directly. This gets the enable count straight. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 6b88f2df97..b6f87e47c6 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -12,23 +12,25 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data)
{
struct fb_info *info = cdev->priv;
struct fb_info **fb;
+ int ret;
switch (req) {
case FBIOGET_SCREENINFO:
fb = data;
*fb = info;
+ ret = 0;
break;
case FBIO_ENABLE:
- info->fbops->fb_enable(info);
+ ret = fb_enable(info);
break;
case FBIO_DISABLE:
- info->fbops->fb_disable(info);
+ ret = fb_disable(info);
break;
default:
return -ENOSYS;
}
- return 0;
+ return ret;
}
static int fb_close(struct cdev *cdev)