diff options
author | Paul Saab <ps@FreeBSD.org> | 2004-04-18 02:39:01 +0000 |
---|---|---|
committer | Paul Saab <ps@FreeBSD.org> | 2004-04-18 02:39:01 +0000 |
commit | 78d033619f8254c08948ab21406d1c08a5cfbf5c (patch) | |
tree | f9464f69b149c1ee93b972b0c22d7d23a795457e /sys | |
parent | 212b6d524452fa4368adc716f36071267a8a763b (diff) | |
download | src-78d033619f8254c08948ab21406d1c08a5cfbf5c.tar.gz src-78d033619f8254c08948ab21406d1c08a5cfbf5c.zip |
move the cleanup of the control device into ciss_free and add some
ifdefs for the diffrent kthread_create API between -current and
-stable
Notes
Notes:
svn path=/head/; revision=128377
Diffstat (limited to 'sys')
-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 f060da74d53a..7e581bcae276 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"); } |