diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-03-03 05:49:00 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-03-03 05:49:00 +0000 |
| commit | cc240f1e7d5a17e0efe99051c60dacff2e8a886c (patch) | |
| tree | c21033163e6a39e220437f9d0150780602138064 /sys/dev | |
| parent | 2e1d5ce10b8f3c9edf5496c4e167013cda05f170 (diff) | |
usbnet: Make detach order reverse attach order, for unp_stat_ch.
No functional change intended.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/usbnet.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/usbnet.c b/sys/dev/usb/usbnet.c index c58a4c8042a..ca4e5785ccc 100644 --- a/sys/dev/usb/usbnet.c +++ b/sys/dev/usb/usbnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.60 2022/03/03 05:48:52 riastradh Exp $ */ +/* $NetBSD: usbnet.c,v 1.61 2022/03/03 05:49:00 riastradh Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.60 2022/03/03 05:48:52 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.61 2022/03/03 05:49:00 riastradh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1669,7 +1669,6 @@ usbnet_detach(device_t self, int flags) usbnet_rx_list_free(un); usbnet_tx_list_free(un); - callout_destroy(&unp->unp_stat_ch); rnd_detach_source(&unp->unp_rndsrc); cv_destroy(&unp->unp_detachcv); @@ -1677,6 +1676,8 @@ usbnet_detach(device_t self, int flags) mutex_destroy(&unp->unp_rxlock); mutex_destroy(&unp->unp_txlock); + callout_destroy(&unp->unp_stat_ch); + pmf_device_deregister(un->un_dev); usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, un->un_udev, un->un_dev); |
