summaryrefslogtreecommitdiff
path: root/linux-core/drm_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_auth.c')
-rw-r--r--linux-core/drm_auth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux-core/drm_auth.c b/linux-core/drm_auth.c
index 8e85a761..20c8a634 100644
--- a/linux-core/drm_auth.c
+++ b/linux-core/drm_auth.c
@@ -50,7 +50,7 @@ static struct drm_file *drm_find_file(struct drm_master *master , drm_magic_t ma
struct drm_file *retval = NULL;
struct drm_magic_entry *pt;
struct drm_hash_item *hash;
- struct drm_device *dev = master->dev;
+ struct drm_device *dev = master->minor->dev;
mutex_lock(&dev->struct_mutex);
if (!drm_ht_find_item(&master->magiclist, (unsigned long)magic, &hash)) {
@@ -76,7 +76,7 @@ static int drm_add_magic(struct drm_master *master, struct drm_file * priv,
drm_magic_t magic)
{
struct drm_magic_entry *entry;
- struct drm_device *dev = master->dev;
+ struct drm_device *dev = master->minor->dev;
DRM_DEBUG("%d\n", magic);
entry = drm_alloc(sizeof(*entry), DRM_MEM_MAGIC);
@@ -106,7 +106,7 @@ static int drm_remove_magic(struct drm_master *master, drm_magic_t magic)
{
struct drm_magic_entry *pt;
struct drm_hash_item *hash;
- struct drm_device *dev = master->dev;
+ struct drm_device *dev = master->minor->dev;
DRM_DEBUG("%d\n", magic);
@@ -154,9 +154,9 @@ int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv)
++sequence; /* reserve 0 */
auth->magic = sequence++;
spin_unlock(&lock);
- } while (drm_find_file(dev->primary->master, auth->magic));
+ } while (drm_find_file(file_priv->master, auth->magic));
file_priv->magic = auth->magic;
- drm_add_magic(dev->primary->master, file_priv, auth->magic);
+ drm_add_magic(file_priv->master, file_priv, auth->magic);
}
DRM_DEBUG("%u\n", auth->magic);
@@ -182,9 +182,9 @@ int drm_authmagic(struct drm_device *dev, void *data,
struct drm_file *file;
DRM_DEBUG("%u\n", auth->magic);
- if ((file = drm_find_file(dev->primary->master, auth->magic))) {
+ if ((file = drm_find_file(file_priv->master, auth->magic))) {
file->authenticated = 1;
- drm_remove_magic(dev->primary->master, auth->magic);
+ drm_remove_magic(file_priv->master, auth->magic);
return 0;
}
return -EINVAL;