summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/fdc/fdc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 7970232..22e810b 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1205,7 +1205,6 @@ fdc_thread(void *arg)
mtx_lock(&fdc->fdc_mtx);
}
fdc->flags &= ~(FDC_KTHREAD_EXIT | FDC_KTHREAD_ALIVE);
- wakeup(&fdc->fdc_thread);
mtx_unlock(&fdc->fdc_mtx);
kthread_exit(0);
@@ -1711,8 +1710,8 @@ fdc_detach(device_t dev)
return (error);
/* kill worker thread */
- fdc->flags |= FDC_KTHREAD_EXIT;
mtx_lock(&fdc->fdc_mtx);
+ fdc->flags |= FDC_KTHREAD_EXIT;
wakeup(&fdc->head);
while ((fdc->flags & FDC_KTHREAD_ALIVE) != 0)
msleep(&fdc->fdc_thread, &fdc->fdc_mtx, PRIBIO, "fdcdet", 0);
OpenPOWER on IntegriCloud