mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] video: call fb_[en|dis]able instead of fops directly
Date: Fri, 10 Mar 2017 08:08:54 +0100	[thread overview]
Message-ID: <20170310070854.30358-1-s.hauer@pengutronix.de> (raw)

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>
---
 drivers/video/fb.c | 8 +++++---
 1 file 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)
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2017-03-10  7:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170310070854.30358-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox