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>
This commit is contained in:
parent
52e9a842e3
commit
f8f3f26f8b
|
@ -12,23 +12,25 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data)
|
||||||
{
|
{
|
||||||
struct fb_info *info = cdev->priv;
|
struct fb_info *info = cdev->priv;
|
||||||
struct fb_info **fb;
|
struct fb_info **fb;
|
||||||
|
int ret;
|
||||||
|
|
||||||
switch (req) {
|
switch (req) {
|
||||||
case FBIOGET_SCREENINFO:
|
case FBIOGET_SCREENINFO:
|
||||||
fb = data;
|
fb = data;
|
||||||
*fb = info;
|
*fb = info;
|
||||||
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
case FBIO_ENABLE:
|
case FBIO_ENABLE:
|
||||||
info->fbops->fb_enable(info);
|
ret = fb_enable(info);
|
||||||
break;
|
break;
|
||||||
case FBIO_DISABLE:
|
case FBIO_DISABLE:
|
||||||
info->fbops->fb_disable(info);
|
ret = fb_disable(info);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fb_close(struct cdev *cdev)
|
static int fb_close(struct cdev *cdev)
|
||||||
|
|
Loading…
Reference in New Issue