diff options
author | ps <ps@FreeBSD.org> | 2004-04-18 02:39:01 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2004-04-18 02:39:01 +0000 |
commit | a5053e5684c3643b6d8cab6a085b93abdb2ac8f4 (patch) | |
tree | f9464f69b149c1ee93b972b0c22d7d23a795457e /sys/dev/ciss | |
parent | 9cffdfc5cab4dbd32d0b1fe590e1d003682a5359 (diff) | |
download | FreeBSD-src-a5053e5684c3643b6d8cab6a085b93abdb2ac8f4.zip FreeBSD-src-a5053e5684c3643b6d8cab6a085b93abdb2ac8f4.tar.gz |
move the cleanup of the control device into ciss_free and add some
ifdefs for the diffrent kthread_create API between -current and
-stable
Diffstat (limited to 'sys/dev/ciss')
-rw-r--r-- | sys/dev/ciss/ciss.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index f060da7..7e581bc 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -458,8 +458,6 @@ ciss_detach(device_t dev) /* flush adapter cache */ ciss_flush_adapter(sc); - destroy_dev(sc->ciss_dev_t); - /* release all resources */ ciss_free(sc); @@ -1503,6 +1501,10 @@ ciss_free(struct ciss_softc *sc) ciss_kill_notify_thread(sc); + /* remove the control device */ + if (sc->ciss_dev_t != NULL) + destroy_dev(sc->ciss_dev_t); + /* free the controller data */ if (sc->ciss_id != NULL) free(sc->ciss_id, CISS_MALLOC_CLASS); @@ -3412,9 +3414,15 @@ static void ciss_spawn_notify_thread(struct ciss_softc *sc) { +#if __FreeBSD_version > 500005 if (kthread_create((void(*)(void *))ciss_notify_thread, sc, &sc->ciss_notify_thread, 0, 0, "ciss_notify%d", device_get_unit(sc->ciss_dev))) +#else + if (kthread_create((void(*)(void *))ciss_notify_thread, sc, + &sc->ciss_notify_thread, "ciss_notify%d", + device_get_unit(sc->ciss_dev))) +#endif panic("Could not create notify thread\n"); } |