Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Call {mutex, cv}_destroy on all mutexes/condvars



details:   https://anonhg.NetBSD.org/src/rev/b5f1257f5c1a
branches:  trunk
changeset: 349654:b5f1257f5c1a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Dec 17 15:27:26 2016 +0000

description:
Call {mutex,cv}_destroy on all mutexes/condvars

diffstat:

 sys/dev/usb/if_athn_usb.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 99b5c86b5486 -r b5f1257f5c1a sys/dev/usb/if_athn_usb.c
--- a/sys/dev/usb/if_athn_usb.c Sat Dec 17 15:24:35 2016 +0000
+++ b/sys/dev/usb/if_athn_usb.c Sat Dec 17 15:27:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_athn_usb.c,v 1.18 2016/12/11 15:01:37 skrll Exp $   */
+/*     $NetBSD: if_athn_usb.c,v 1.19 2016/12/17 15:27:26 skrll Exp $   */
 /*     $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $  */
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.18 2016/12/11 15:01:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.19 2016/12/17 15:27:26 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -499,8 +499,15 @@
        athn_usb_close_pipes(usc);
 
        mutex_destroy(&usc->usc_tx_mtx);
+       cv_destroy(&usc->usc_task_cv);
        mutex_destroy(&usc->usc_task_mtx);
-       cv_destroy(&usc->usc_task_cv);
+
+       mutex_destroy(&usc->usc_cmd_mtx);
+       cv_destroy(&usc->usc_cmd_cv);
+       mutex_destroy(&usc->usc_msg_mtx);
+       cv_destroy(&usc->usc_msg_cv);
+
+       mutex_destroy(&usc->usc_lock);
 
        usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, usc->usc_udev, sc->sc_dev);
        return 0;



Home | Main Index | Thread Index | Old Index