From ad8eb0ed01d96cc16cdafd3b48c0f0cd73d315b4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 27 May 2008 14:12:51 -0700 Subject: [FreeBSD] Convert from drm_device_t to struct drm_device for consistency. --- bsd-core/drm_auth.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bsd-core/drm_auth.c') diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c index aa8238c4..3423e67a 100644 --- a/bsd-core/drm_auth.c +++ b/bsd-core/drm_auth.c @@ -43,7 +43,7 @@ static int drm_hash_magic(drm_magic_t magic) /** * Returns the file private associated with the given magic number. */ -static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic) +static drm_file_t *drm_find_file(struct drm_device *dev, drm_magic_t magic) { drm_magic_entry_t *pt; int hash = drm_hash_magic(magic); @@ -63,7 +63,8 @@ static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic) * Inserts the given magic number into the hash table of used magic number * lists. */ -static int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) +static int drm_add_magic(struct drm_device *dev, drm_file_t *priv, + drm_magic_t magic) { int hash; drm_magic_entry_t *entry; @@ -96,7 +97,7 @@ static int drm_add_magic(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) * Removes the given magic number from the hash table of used magic number * lists. */ -static int drm_remove_magic(drm_device_t *dev, drm_magic_t magic) +static int drm_remove_magic(struct drm_device *dev, drm_magic_t magic) { drm_magic_entry_t *prev = NULL; drm_magic_entry_t *pt; @@ -134,7 +135,7 @@ static int drm_remove_magic(drm_device_t *dev, drm_magic_t magic) * connection that the magic is passed over) to determine if the magic number * should be authenticated. */ -int drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) +int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) { static drm_magic_t sequence = 0; drm_auth_t *auth = data; @@ -165,7 +166,8 @@ int drm_getmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) /** * Marks the client associated with the given magic number as authenticated. */ -int drm_authmagic(drm_device_t *dev, void *data, struct drm_file *file_priv) +int drm_authmagic(struct drm_device *dev, void *data, + struct drm_file *file_priv) { drm_auth_t *auth = data; drm_file_t *priv; -- cgit v1.2.3 From 200ac59573b43abd112d27a1ddda3c124ba9db2a Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Tue, 27 May 2008 14:59:38 -0700 Subject: [BSD] Remove superfluous recursive locking in drm_add_magic. --- bsd-core/drm_auth.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'bsd-core/drm_auth.c') diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c index 3423e67a..f3aafe44 100644 --- a/bsd-core/drm_auth.c +++ b/bsd-core/drm_auth.c @@ -80,7 +80,6 @@ static int drm_add_magic(struct drm_device *dev, drm_file_t *priv, entry->priv = priv; entry->next = NULL; - DRM_LOCK(); if (dev->magiclist[hash].tail) { dev->magiclist[hash].tail->next = entry; dev->magiclist[hash].tail = entry; @@ -88,7 +87,6 @@ static int drm_add_magic(struct drm_device *dev, drm_file_t *priv, dev->magiclist[hash].head = entry; dev->magiclist[hash].tail = entry; } - DRM_UNLOCK(); return 0; } -- cgit v1.2.3