Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e48aedf

Browse files
committed
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: Simon Ser <[email protected]> Reviewed-by:James Zhu <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Cc: Christian König <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c2268da commit e48aedf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/drm_drv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ DEFINE_STATIC_SRCU(drm_unplug_srcu);
8484
*/
8585

8686
static struct drm_minor **drm_minor_get_slot(struct drm_device *dev,
87-
unsigned int type)
87+
enum drm_minor_type type)
8888
{
8989
switch (type) {
9090
case DRM_MINOR_PRIMARY:
@@ -116,7 +116,7 @@ static void drm_minor_alloc_release(struct drm_device *dev, void *data)
116116
}
117117
}
118118

119-
static int drm_minor_alloc(struct drm_device *dev, unsigned int type)
119+
static int drm_minor_alloc(struct drm_device *dev, enum drm_minor_type type)
120120
{
121121
struct drm_minor *minor;
122122
unsigned long flags;
@@ -160,7 +160,7 @@ static int drm_minor_alloc(struct drm_device *dev, unsigned int type)
160160
return 0;
161161
}
162162

163-
static int drm_minor_register(struct drm_device *dev, unsigned int type)
163+
static int drm_minor_register(struct drm_device *dev, enum drm_minor_type type)
164164
{
165165
struct drm_minor *minor;
166166
unsigned long flags;
@@ -203,7 +203,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
203203
return ret;
204204
}
205205

206-
static void drm_minor_unregister(struct drm_device *dev, unsigned int type)
206+
static void drm_minor_unregister(struct drm_device *dev, enum drm_minor_type type)
207207
{
208208
struct drm_minor *minor;
209209
unsigned long flags;

0 commit comments

Comments
 (0)