From patchwork Sun Jul 8 21:56:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1170421 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3171540239 for ; Sun, 8 Jul 2012 22:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752474Ab2GHV5v (ORCPT ); Sun, 8 Jul 2012 17:57:51 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:42390 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476Ab2GHV5B (ORCPT ); Sun, 8 Jul 2012 17:57:01 -0400 Received: by mail-we0-f174.google.com with SMTP id x8so708039wey.19 for ; Sun, 08 Jul 2012 14:57:00 -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=tXMFnsNslTAi6q/l7JE6kQxYJWkM1RGjpZ2DUmGSwJI=; b=FcUVfPiblWIiz3jbeg/gy+BBugXsW3qTts4bYohG1vScF5pNkGozOzljkjU2RiSQrv eZtOClYsGvOjydSpXDpzkIhjJDg8aTVW5EEU3nF+CtoQeKvI5jFcef/mBmVi7AI7Uixo dHLJpjF0fW7GfLhVAjI8KUqqNu4OD0xfgEur1VN51XNt8M/9cuenylfuN9SWCwoq6SOy HaPwMZYxb/xFhjjPjkjglPHv0Q5BgUrE5D1xsLj6UYtKVg2wmgGqQUCcas/8qlVlntld MOEcgvxvi5gKMVlCYeCcM/pZhYn6cgCX8nh9a2mHkKi1H8t08/E9MxXJljlhxv45mgaB n5xQ== Received: by 10.216.153.139 with SMTP id f11mr5363408wek.16.1341784620080; Sun, 08 Jul 2012 14:57:00 -0700 (PDT) Received: from localhost.localdomain (stgt-5f719b43.pool.mediaWays.net. [95.113.155.67]) by mx.google.com with ESMTPS id j6sm29743837wiy.4.2012.07.08.14.56.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 Jul 2012 14:56:59 -0700 (PDT) From: David Herrmann To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, florianschandinat@gmx.de, linux-fbdev@vger.kernel.org, gregkh@linuxfoundation.org, alan@lxorguk.ukuu.org.uk, bonbons@linux-vserver.org, David Herrmann Subject: [PATCH v2 04/11] fbdev: export get_fb_info()/put_fb_info() Date: Sun, 8 Jul 2012 23:56:47 +0200 Message-Id: <1341784614-2797-5-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.7.11.1 In-Reply-To: <1341784614-2797-1-git-send-email-dh.herrmann@googlemail.com> References: <1341784614-2797-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..474460c 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(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(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) {