Commit e48aedf7 authored by Simon Ser's avatar Simon Ser

drm/drv: use enum drm_minor_type when appropriate

This makes it easier to figure out what the "type" variable can be
set to when reading the implementation of these functions.
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Reviewed-by: default avatarJames Zhu <James.Zhu@amd.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714104557.518457-1-contact@emersion.fr
parent c2268daa
...@@ -84,7 +84,7 @@ DEFINE_STATIC_SRCU(drm_unplug_srcu); ...@@ -84,7 +84,7 @@ DEFINE_STATIC_SRCU(drm_unplug_srcu);
*/ */
static struct drm_minor **drm_minor_get_slot(struct drm_device *dev, static struct drm_minor **drm_minor_get_slot(struct drm_device *dev,
unsigned int type) enum drm_minor_type type)
{ {
switch (type) { switch (type) {
case DRM_MINOR_PRIMARY: case DRM_MINOR_PRIMARY:
...@@ -116,7 +116,7 @@ static void drm_minor_alloc_release(struct drm_device *dev, void *data) ...@@ -116,7 +116,7 @@ static void drm_minor_alloc_release(struct drm_device *dev, void *data)
} }
} }
static int drm_minor_alloc(struct drm_device *dev, unsigned int type) static int drm_minor_alloc(struct drm_device *dev, enum drm_minor_type type)
{ {
struct drm_minor *minor; struct drm_minor *minor;
unsigned long flags; unsigned long flags;
...@@ -160,7 +160,7 @@ static int drm_minor_alloc(struct drm_device *dev, unsigned int type) ...@@ -160,7 +160,7 @@ static int drm_minor_alloc(struct drm_device *dev, unsigned int type)
return 0; return 0;
} }
static int drm_minor_register(struct drm_device *dev, unsigned int type) static int drm_minor_register(struct drm_device *dev, enum drm_minor_type type)
{ {
struct drm_minor *minor; struct drm_minor *minor;
unsigned long flags; unsigned long flags;
...@@ -203,7 +203,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type) ...@@ -203,7 +203,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
return ret; return ret;
} }
static void drm_minor_unregister(struct drm_device *dev, unsigned int type) static void drm_minor_unregister(struct drm_device *dev, enum drm_minor_type type)
{ {
struct drm_minor *minor; struct drm_minor *minor;
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment