From patchwork Sun Aug 12 14:53:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1309861 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4B00DDFF7B for ; Sun, 12 Aug 2012 14:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751672Ab2HLOyo (ORCPT ); Sun, 12 Aug 2012 10:54:44 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:41246 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485Ab2HLOwh (ORCPT ); Sun, 12 Aug 2012 10:52:37 -0400 Received: by mail-wg0-f44.google.com with SMTP id dr13so2827298wgb.1 for ; Sun, 12 Aug 2012 07:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=LbRRM6SVLWQriLe2sGYQAr8XO5kmN69v0qqma7QG7NM=; b=00c7W6EqGE3yZarq2iAduytZd6c3kQZV5IitD8dZKr7vvg9dxRct2JP0HfbdedADK2 cUY0mm1LvKqpiffo53cKVDV1/7uqbXLHdstpJlLjiH98nxgYbagjXxnqYCxJIJcRWkLo MZp2+SHHvhGGzZj69vEA/XdFpqvcC1hcW/9DtG25nUME1yip/50XHuAIaHuvx4/vYTw1 pBkjt6hl6+Vk//W4zWyCYbJPc78QuSiryNgdPuvtF4Wa5jIz286mXtbp2VFs4MWRswJY msYUO/6S2I5dn2Sy1CSYbBQX+Gzz71SNwrSu31ygF2C0bVTXcrd/MvQa8rI1EhqnZtaL 1Naw== Received: by 10.180.79.69 with SMTP id h5mr11104119wix.6.1344783156384; Sun, 12 Aug 2012 07:52:36 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71bba7.pool.mediaWays.net. [95.113.187.167]) by mx.google.com with ESMTPS id k20sm10803202wiv.11.2012.08.12.07.52.35 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 07:52:36 -0700 (PDT) From: David Herrmann To: linux-fbdev@vger.kernel.org Cc: Florian Tobias Schandinat , Greg Kroah-Hartman , linux-serial@vger.kernel.org, Alan Cox , linux-kernel@vger.kernel.org, Geert Uytterhoeven , David Herrmann Subject: [PATCH 04/11] fbdev: export get_fb_info()/put_fb_info() Date: Sun, 12 Aug 2012 16:53:18 +0200 Message-Id: <1344783205-2384-5-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1344783205-2384-1-git-send-email-dh.herrmann@googlemail.com> References: <1344783205-2384-1-git-send-email-dh.herrmann@googlemail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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 --- 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) {