linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@googlemail.com>
To: linux-kernel@vger.kernel.org
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fbdev@vger.kernel.org, linux-serial@vger.kernel.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	David Herrmann <dh.herrmann@googlemail.com>
Subject: [PATCH v3 04/11] fbdev: export get_fb_info()/put_fb_info()
Date: Sun, 15 Jul 2012 19:04:39 +0000	[thread overview]
Message-ID: <1342379086-7583-5-git-send-email-dh.herrmann@googlemail.com> (raw)
In-Reply-To: <1342379086-7583-1-git-send-email-dh.herrmann@googlemail.com>

When adding other internal users of the framebuffer subsystem, we need a
way to get references to framebuffers. These two functions already exist
so export them.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
 drivers/video/fbmem.c | 6 ++++--
 include/linux/fb.h    | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0dff12a..1312ba2 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -46,7 +46,7 @@ static DEFINE_MUTEX(registration_lock);
 struct fb_info *registered_fb[FB_MAX] __read_mostly;
 int num_registered_fb __read_mostly;
 
-static struct fb_info *get_fb_info(unsigned int idx)
+struct fb_info *get_fb_info(unsigned int idx)
 {
 	struct fb_info *fb_info;
 
@@ -61,14 +61,16 @@ static struct fb_info *get_fb_info(unsigned int idx)
 
 	return fb_info;
 }
+EXPORT_SYMBOL_GPL(get_fb_info);
 
-static void put_fb_info(struct fb_info *fb_info)
+void put_fb_info(struct fb_info *fb_info)
 {
 	if (!atomic_dec_and_test(&fb_info->count))
 		return;
 	if (fb_info->fbops->fb_destroy)
 		fb_info->fbops->fb_destroy(fb_info);
 }
+EXPORT_SYMBOL_GPL(put_fb_info);
 
 int lock_fb_info(struct fb_info *info)
 {
diff --git a/include/linux/fb.h b/include/linux/fb.h
index ac3f1c6..2d51c0e 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1033,6 +1033,9 @@ static inline void unlock_fb_info(struct fb_info *info)
 	mutex_unlock(&info->lock);
 }
 
+extern struct fb_info *get_fb_info(unsigned int idx);
+extern void put_fb_info(struct fb_info *fb_info);
+
 static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
 					   u8 *src, u32 s_pitch, u32 height)
 {
-- 
1.7.11.2


  parent reply	other threads:[~2012-07-15 19:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-15 19:04 [PATCH v3 00/11] fblog: Framebuffer kernel log driver v3 David Herrmann
2012-07-15 19:04 ` [PATCH v3 01/11] fbcon: move update_attr() into separate source file David Herrmann
2012-07-15 19:04 ` [PATCH v3 02/11] fbcon: move bit_putcs() " David Herrmann
2012-07-15 19:04 ` [PATCH v3 03/11] fblog: new framebuffer kernel log dummy driver David Herrmann
2012-07-15 19:04 ` David Herrmann [this message]
2012-07-15 19:04 ` [PATCH v3 05/11] fblog: register one fblog object per framebuffer David Herrmann
2012-07-15 19:04 ` [PATCH v3 06/11] fblog: open fb on registration David Herrmann
2012-07-15 19:04 ` [PATCH v3 07/11] fblog: allow selecting fbs via sysfs David Herrmann
2012-07-15 19:04 ` [PATCH v3 08/11] fblog: cache framebuffer BLANK and SUSPEND states David Herrmann
2012-07-15 19:04 ` [PATCH v3 09/11] fblog: register console driver David Herrmann
2012-07-15 19:04 ` [PATCH v3 10/11] fblog: draw console to framebuffers David Herrmann
2012-07-15 19:04 ` [PATCH v3 11/11] MAINTAINERS: add fblog entry David Herrmann

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=1342379086-7583-5-git-send-email-dh.herrmann@googlemail.com \
    --to=dh.herrmann@googlemail.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).