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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user