From: David Herrmann <dh.herrmann@gmail.com>
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 [thread overview]
Message-ID: <1382288145-1776-3-git-send-email-dh.herrmann@gmail.com> (raw)
In-Reply-To: <1382288145-1776-1-git-send-email-dh.herrmann@gmail.com>
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 <dh.herrmann@gmail.com>
---
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 */
--
1.8.4.1
next prev parent reply other threads:[~2013-10-20 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-20 16:55 [PATCH 1/6] drm: call drm_unplug_minor() from drm_put_minor() David Herrmann
2013-10-20 16:55 ` [PATCH 2/6] drm: simplify drm_put_minor() David Herrmann
2013-10-20 16:55 ` David Herrmann [this message]
2013-10-20 16:55 ` [PATCH 4/6] drm: cleanup debugfs in drm_unplug_minor() David Herrmann
2013-10-20 16:55 ` [PATCH 5/6] drm: remove minor-id during unplug David Herrmann
2013-10-20 16:55 ` [PATCH 6/6] drm: delay minor destruction to drm_dev_free() David Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382288145-1776-3-git-send-email-dh.herrmann@gmail.com \
--to=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox