aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2016-04-26 19:29:38 +0200
committerDaniel Vetter <[email protected]>2016-04-27 08:46:41 +0200
commit0d787b143d83de94decb801701a005ffd3ec6823 (patch)
tree8aac5fec896220c3cb7b8085432587780efeb946
parentec1f52efc0406a72870a1fcb859f18dea24bcd8b (diff)
drm: Push struct_mutex into ->master_destroy
Only two drivers implement this hook. vmwgfx (which doesn't need it really) and legacy radeon (which since v1 has been nuked, yay). v1: Rebase over radeon ums removal. Cc: Thomas Hellstrom <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/drm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index f8a7a6e66b7e..55273f8f3acb 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -123,10 +123,10 @@ static void drm_master_destroy(struct kref *kref)
struct drm_device *dev = master->minor->dev;
struct drm_map_list *r_list, *list_temp;
- mutex_lock(&dev->struct_mutex);
if (dev->driver->master_destroy)
dev->driver->master_destroy(dev, master);
+ mutex_lock(&dev->struct_mutex);
list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head) {
if (r_list->master == master) {
drm_legacy_rmmap_locked(dev, r_list->map);