From patchwork Tue Jul 11 13:38:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 9834723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4750560363 for ; Tue, 11 Jul 2017 13:38:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38EF725EA6 for ; Tue, 11 Jul 2017 13:38:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D324283BB; Tue, 11 Jul 2017 13:38:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 268A425EA6 for ; Tue, 11 Jul 2017 13:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932498AbdGKNih (ORCPT ); Tue, 11 Jul 2017 09:38:37 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33984 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932486AbdGKNig (ORCPT ); Tue, 11 Jul 2017 09:38:36 -0400 Received: by mail-qk0-f194.google.com with SMTP id q66so6539939qki.1; Tue, 11 Jul 2017 06:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ko1uBq8lOXOGlLRXh7KTSkknHYXbs0fqVMBkByAIZfY=; b=RIcPqdThlcWdGqYWP0zIqY/qB+bph9AReLsdMQ34Npox1xXZK8SiX5lYeCjLMJc17A X/HKTIywldNHj2M69y0Y3WhGZ/q4IveXUPGTV+UD+qwNkAcsiQkBKy7vZyoTEltY2STt /El3luD9U+eaftYUOdZ6VJY7z1b3zJX2ZPccBQ54M8UjkrAeoog4etcH1lp6lUNL1H4/ eP+m4v2FYfZpSqB4HYk9/Ct8gQNrbS+o0j3LQirZpr4s1gW/5dlJ8ahWG4MVGtWGVT/J GmAHXP8r9jpvcf15c15CElO35ADUH8HtJt4QoUA4l8PC1DwdTXuVtfVK7nTMQLXD6iMz dGUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ko1uBq8lOXOGlLRXh7KTSkknHYXbs0fqVMBkByAIZfY=; b=IHHOOPvKS6N63K1+OjFkPcLRyMZ3AIOfly72bU5BGdOl+FyKRxJ65KLZ9evFithK2W gKPbmrX8RMX+eHLQO3xAW55ApVDi+3aoyQ1mlZ3Ix1wVq2h2DQVL+pPhXvKjsXhaK7wW Hnlju4AYW9thTqgmvBsrvDeul0Rrns+NgxyBpvfpxgppBV0hqaEewLNCBwG+V3eIWgnd EYlzG1y9e7fy1U631EBrJzjZKnuZHK3jwHAZ2inwxTOyzpqLaW46Jin/vESwlGd6RbC9 goCmgobDT+QJgdqi6F46ktg/MAtskNwi4sO+Xp4yAYw5SDWMCYltlHfUe5fK3lFB2SUm Y3cQ== X-Gm-Message-State: AIVw112+X1LIGSibPmgVl63zVFTsBXM4tFeEAyaGeGiZzpBTW1qwZAnV qIWBkxAN0AVQdA== X-Received: by 10.55.3.139 with SMTP id 133mr9711290qkd.65.1499780315541; Tue, 11 Jul 2017 06:38:35 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id n67sm11191171qte.41.2017.07.11.06.38.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2017 06:38:34 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Archit Taneja , Bartlomiej Zolnierkiewicz , Rob Clark Subject: [PATCH 2/3] fbdev: fbmem: export get/put_fb_info() Date: Tue, 11 Jul 2017 09:38:21 -0400 Message-Id: <20170711133822.31978-3-robdclark@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170711133822.31978-1-robdclark@gmail.com> References: <20170711133822.31978-1-robdclark@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Needed for following patch. Signed-off-by: Rob Clark Acked-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/core/fbmem.c | 6 ++++-- include/linux/fb.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 5324358f110f..db88c7bf3afe 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -50,7 +50,7 @@ EXPORT_SYMBOL(registered_fb); int num_registered_fb __read_mostly; EXPORT_SYMBOL(num_registered_fb); -static struct fb_info *get_fb_info(unsigned int idx) +struct fb_info *get_fb_info(unsigned int idx) { struct fb_info *fb_info; @@ -65,14 +65,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 a964d076b4dc..eccae50db5ed 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -650,6 +650,8 @@ extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; extern struct class *fb_class; +extern struct fb_info *get_fb_info(unsigned int idx); +extern void put_fb_info(struct fb_info *fb_info); extern int lock_fb_info(struct fb_info *info); static inline void unlock_fb_info(struct fb_info *info)