Lines 110-124
Link Here
|
110 |
return 0; |
110 |
return 0; |
111 |
} |
111 |
} |
112 |
|
112 |
|
113 |
@@ -659,6 +683,11 @@ soundcard_detach (void) |
113 |
@@ -656,6 +680,11 @@ soundcard_detach (void) |
114 |
|
|
|
115 |
if (refcount > 0 || open_devices > 0) |
114 |
if (refcount > 0 || open_devices > 0) |
116 |
return EBUSY; |
115 |
return EBUSY; |
117 |
+ |
116 |
|
118 |
+ for (i = 0; i < MAX_TMOUTS; ++i) |
117 |
+ for (i = 0; i < MAX_TMOUTS; ++i) |
119 |
+ callout_drain(&tmouts[i].timer); |
118 |
+ callout_drain(&tmouts[i].timer); |
120 |
+ |
119 |
+ |
121 |
+ mtx_destroy(&oss_timeout_mutex); |
120 |
+ mtx_destroy(&oss_timeout_mutex); |
122 |
|
121 |
+ |
123 |
oss_unload_drivers (); |
122 |
oss_unload_drivers (); |
124 |
|
123 |
|
|
|
124 |
osdev_delete (core_osdev); |
125 |
@@ -920,15 +949,9 @@ oss_poll (struct cdev *bsd_dev, int events, struct thr |
126 |
return ev.revents; |
127 |
} |
128 |
|
129 |
-#if defined(D_VERSION_03) && (D_VERSION == D_VERSION_03) |
130 |
static int |
131 |
oss_mmap (struct cdev *bsd_dev, vm_ooffset_t offset, vm_paddr_t * paddr, |
132 |
int nprot, vm_memattr_t *memattr) |
133 |
-#else |
134 |
-static int |
135 |
-oss_mmap (struct cdev *bsd_dev, vm_offset_t offset, vm_paddr_t * paddr, |
136 |
- int nprot) |
137 |
-#endif |
138 |
{ |
139 |
int retval; |
140 |
int dev; |