Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm Make mutex destruction match ...



details:   https://anonhg.NetBSD.org/src/rev/0a19bc0eb7a7
branches:  trunk
changeset: 366293:0a19bc0eb7a7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:41:41 2018 +0000

description:
Make mutex destruction match initialization.

>From mrg@.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_drv.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 59ce71973178 -r 0a19bc0eb7a7 sys/external/bsd/drm2/dist/drm/drm_drv.c
--- a/sys/external/bsd/drm2/dist/drm/drm_drv.c  Mon Aug 27 14:41:26 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_drv.c  Mon Aug 27 14:41:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_drv.c,v 1.8 2018/08/27 13:42:47 riastradh Exp $    */
+/*     $NetBSD: drm_drv.c,v 1.9 2018/08/27 14:41:41 riastradh Exp $    */
 
 /*
  * Created: Fri Jan 19 10:48:35 2001 by faith%acm.org@localhost
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.8 2018/08/27 13:42:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.9 2018/08/27 14:41:41 riastradh Exp $");
 
 #include <linux/err.h>
 #include <linux/export.h>
@@ -732,12 +732,15 @@
        drm_fs_inode_free(dev->anon_inode);
 err_free:
 #ifdef __NetBSD__
-       linux_mutex_destroy(&dev->struct_mutex);
+       linux_mutex_destroy(&dev->master_mutex);
        linux_mutex_destroy(&dev->ctxlist_mutex);
-       linux_mutex_destroy(&dev->master_mutex);
+       linux_mutex_destroy(&dev->struct_mutex);
        spin_lock_destroy(&dev->event_lock);
+       spin_lock_destroy(&dev->buf_lock);
 #else
        mutex_destroy(&dev->master_mutex);
+       mutex_destroy(&dev->ctxlist_mutex);
+       mutex_destroy(&dev->struct_mutex);
 #endif
        kfree(dev);
        return NULL;
@@ -760,12 +763,15 @@
        drm_minor_free(dev, DRM_MINOR_CONTROL);
 
 #ifdef __NetBSD__
-       linux_mutex_destroy(&dev->struct_mutex);
+       linux_mutex_destroy(&dev->master_mutex);
        linux_mutex_destroy(&dev->ctxlist_mutex);
-       linux_mutex_destroy(&dev->master_mutex);
+       linux_mutex_destroy(&dev->struct_mutex);
        spin_lock_destroy(&dev->event_lock);
+       spin_lock_destroy(&dev->buf_lock);
 #else
        mutex_destroy(&dev->master_mutex);
+       mutex_destroy(&dev->ctxlist_mutex);
+       mutex_destroy(&dev->struct_mutex);
 #endif
        kfree(dev->unique);
        kfree(dev);



Home | Main Index | Thread Index | Old Index