From patchwork Sun Oct 20 16:55:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 3073471 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E4067BF924 for ; Sun, 20 Oct 2013 16:57:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A0C82027C for ; Sun, 20 Oct 2013 16:57:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3DD8520258 for ; Sun, 20 Oct 2013 16:57:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C5FBE718A for ; Sun, 20 Oct 2013 09:57:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 2328AE7154 for ; Sun, 20 Oct 2013 09:55:59 -0700 (PDT) Received: by mail-ee0-f49.google.com with SMTP id d41so3061101eek.36 for ; Sun, 20 Oct 2013 09:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g51Ti/MBcrxxG3msolrzP/1GYbslMVdGK3SwkSzh71k=; b=TdexmG7SZ+KKBRjaIBJ1/VlPvuYQGkUlGZ2L/HEhGTJfgzpFhJHsAkzovAYNsO0X2P jdhEUsxkp7XzN0fc+ZP4vHPA75jzdrEv6v0KthDlhdothW4X+aDAjQWFGBZ7wzzJncIX PBrGvdhAXOYf+lq5qkyfNLnIsOEkJNlKkyt0S4LQv00H/imE3d07vhg/BxvETK5p+ldx lBg+Y81r9JZhsvHSMsMw4ACmvz7SGxFYnzH2ikg/tYKB1TQRsmR4tTwOhV7kwF6UVdZq UC3Piu9D2UpGttpbUiOvHJJ/pU9/POvQzn92jR++0HlDv4LW94igPTH2itRb16Js5oeq iDCg== X-Received: by 10.14.87.3 with SMTP id x3mr292072eee.121.1382288159396; Sun, 20 Oct 2013 09:55:59 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71a68b.pool.mediaWays.net. [95.113.166.139]) by mx.google.com with ESMTPSA id e13sm32704479eeu.4.2013.10.20.09.55.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Oct 2013 09:55:58 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm: make drm_get_minor() static Date: Sun, 20 Oct 2013 18:55:42 +0200 Message-Id: <1382288145-1776-3-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1382288145-1776-1-git-send-email-dh.herrmann@gmail.com> References: <1382288145-1776-1-git-send-email-dh.herrmann@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drm_get_minor() is only used in one file. Make it static and add a kernel-doc comment which documents the current semantics. Signed-off-by: David Herrmann --- drivers/gpu/drm/drm_stub.c | 19 +++++++++++-------- include/drm/drmP.h | 1 - 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 4f606dc..7feed52 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -255,16 +255,20 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data, } /** - * Get a secondary minor number. + * drm_get_minor - Allocate and register new DRM minor + * @dev: DRM device + * @minor: Pointer to where new minor is stored + * @type: Type of minor * - * \param dev device data structure - * \param sec-minor structure to hold the assigned minor - * \return negative number on failure. + * Allocate a new minor of the given type and register it. A pointer to the new + * minor is returned in @minor. + * Caller must hold the global DRM mutex. * - * Search an empty entry and initialize it to the given parameters. This - * routines assigns minor numbers to secondary heads of multi-headed cards + * RETURNS: + * 0 on success, negative error code on failure. */ -int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type) +static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, + int type) { struct drm_minor *new_minor; int ret; @@ -321,7 +325,6 @@ err_idr: *minor = NULL; return ret; } -EXPORT_SYMBOL(drm_get_minor); /** * drm_unplug_minor - Unplug DRM minor diff --git a/include/drm/drmP.h b/include/drm/drmP.h index dc02fb1..19b8082 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1641,7 +1641,6 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver, void drm_dev_free(struct drm_device *dev); int drm_dev_register(struct drm_device *dev, unsigned long flags); void drm_dev_unregister(struct drm_device *dev); -int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type); /*@}*/ /* PCI section */