summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorThierry Reding2014-04-11 15:23:00 +0200
committerThierry Reding2014-06-05 23:14:32 +0200
commitca8e2ad71013049bc88a10b11d83712bfe56cdd4 (patch)
treea49755ebe6640e63d9c30d0e3df608f1ad8c26b8 /include/drm
parentgpu: host1x: Rename internal functions for clarity (diff)
downloadkernel-qcow2-linux-ca8e2ad71013049bc88a10b11d83712bfe56cdd4.tar.gz
kernel-qcow2-linux-ca8e2ad71013049bc88a10b11d83712bfe56cdd4.tar.xz
kernel-qcow2-linux-ca8e2ad71013049bc88a10b11d83712bfe56cdd4.zip
drm: Introduce drm_dev_set_unique()
Add a helper function that allows drivers to statically set the unique name of the device. This will allow platform and USB drivers to get rid of their DRM bus implementations and directly use drm_dev_alloc() and drm_dev_register(). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 475ca5cf3c20..83222db41566 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1058,6 +1058,7 @@ struct drm_device {
struct drm_minor *render; /**< Render node */
atomic_t unplugged; /**< Flag whether dev is dead */
struct inode *anon_inode; /**< inode for private address-space */
+ char *unique; /**< unique name of the device */
/*@} */
/** \name Locks */
@@ -1617,6 +1618,7 @@ void drm_dev_ref(struct drm_device *dev);
void drm_dev_unref(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_dev_set_unique(struct drm_device *dev, const char *fmt, ...);
struct drm_minor *drm_minor_acquire(unsigned int minor_id);
void drm_minor_release(struct drm_minor *minor);