Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189351
b: refs/heads/master
c: da58405
h: refs/heads/master
i:
  189349: 7919e12
  189347: 8fe808d
  189343: 176b802
v: v3
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Mar 31, 2010
1 parent 6c3da14 commit aa896b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcbc451ba1948fba967198bd150ecbd10bbb7075
refs/heads/master: da58405860b992d2bb21ebae5d685fe3204dd3f0
16 changes: 9 additions & 7 deletions trunk/drivers/gpu/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,16 @@ int drm_open(struct inode *inode, struct file *filp)
spin_unlock(&dev->count_lock);
}
out:
mutex_lock(&dev->struct_mutex);
if (minor->type == DRM_MINOR_LEGACY) {
BUG_ON((dev->dev_mapping != NULL) &&
(dev->dev_mapping != inode->i_mapping));
if (dev->dev_mapping == NULL)
dev->dev_mapping = inode->i_mapping;
if (!retcode) {
mutex_lock(&dev->struct_mutex);
if (minor->type == DRM_MINOR_LEGACY) {
if (dev->dev_mapping == NULL)
dev->dev_mapping = inode->i_mapping;
else if (dev->dev_mapping != inode->i_mapping)
retcode = -ENODEV;
}
mutex_unlock(&dev->struct_mutex);
}
mutex_unlock(&dev->struct_mutex);

return retcode;
}
Expand Down

0 comments on commit aa896b6

Please sign in to comment.