From patchwork Sun Jul 15 19:04:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1199301 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 C4EF540B37 for ; Sun, 15 Jul 2012 19:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751017Ab2GOTG1 (ORCPT ); Sun, 15 Jul 2012 15:06:27 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:62804 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484Ab2GOTF0 (ORCPT ); Sun, 15 Jul 2012 15:05:26 -0400 Received: by weyx8 with SMTP id x8so3536651wey.19 for ; Sun, 15 Jul 2012 12:05:24 -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=UYtq8BB2Sdozv8/VLEJ/HfcAtFJ5aPIB2xSISv8iuVo=; b=sWQ7hLYxwFkuUWNl9tMg9ZkMnmE4i1IayDgacFSad5lICy0WWkSvIlhm6u1txhQb0X OWBUBn6T8PAAL0GPCyxVvAQIeEceSObzNxF5wn3qIJp/bfhBsiDzZYzsZtA/69LGd3Xf efcHumwYwK1g9IRbSieAjk4G5rjWcyytuDX/EqQKsNQ+brUfj3kfeetDl3z9/dF9JBPb szW6LPHEqObOU6SCKJlxjVEfx76Oew+BFfzWtkL4JWN4S7UKeiC8qZhLC9RbRThy4ZoJ 0kZLLe5Dc3x71Z4qtVomP3mq1brXjDA68qyty6DXh2Xzdj00GmF7+jh1FQPYlTi2/wnh KbwQ== Received: by 10.217.2.69 with SMTP id o47mr4364181wes.22.1342379124492; Sun, 15 Jul 2012 12:05:24 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71ba59.pool.mediaWays.net. [95.113.186.89]) by mx.google.com with ESMTPS id j6sm25479086wiy.4.2012.07.15.12.05.23 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 Jul 2012 12:05:24 -0700 (PDT) From: David Herrmann To: linux-kernel@vger.kernel.org Cc: Florian Tobias Schandinat , Andrew Morton , Greg Kroah-Hartman , linux-fbdev@vger.kernel.org, linux-serial@vger.kernel.org, Alan Cox , David Herrmann Subject: [PATCH v3 04/11] fbdev: export get_fb_info()/put_fb_info() Date: Sun, 15 Jul 2012 21:04:39 +0200 Message-Id: <1342379086-7583-5-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1342379086-7583-1-git-send-email-dh.herrmann@googlemail.com> References: <1342379086-7583-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) {