diff options
author | delphij <delphij@FreeBSD.org> | 2009-04-09 07:45:23 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-04-09 07:45:23 +0000 |
commit | af51670d80c8f068c2f158e55a9a6a6a5f5ce6b6 (patch) | |
tree | f823c0682773c95234fbd6a52d17927fccffa558 /sys/dev | |
parent | 241f791e9c068a9bb07d67ab52a166b990dfc23f (diff) | |
download | FreeBSD-src-af51670d80c8f068c2f158e55a9a6a6a5f5ce6b6.zip FreeBSD-src-af51670d80c8f068c2f158e55a9a6a6a5f5ce6b6.tar.gz |
Use DEVICE_SHUTDOWN(9) mechanism for shutdown handler.
Suggested by: jhb
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/hptmv/entry.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 0414885..843281a 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -93,7 +93,7 @@ static device_method_t driver_methods[] = { DEVMETHOD(device_attach, hpt_attach), DEVMETHOD(device_detach, hpt_detach), -/* DEVMETHOD(device_shutdown, hpt_shutdown), */ + DEVMETHOD(device_shutdown, hpt_shutdown), { 0, 0 } }; @@ -2138,13 +2138,7 @@ hpt_attach(device_t dev) xpt_action((union ccb *)ccb); free(ccb, M_DEVBUF); - /* Register a shutdown handler to flush data for the current adapter */ - pAdapter->eh = EVENTHANDLER_REGISTER(shutdown_final, - hpt_shutdown, dev, SHUTDOWN_PRI_DEFAULT); - if (pAdapter->eh == NULL) { - device_printf(pAdapter->hpt_dev, - "shutdown event registration failed\n"); - } else if (device_get_unit(dev) == 0) { + if (device_get_unit(dev) == 0) { /* Start the work thread. XXX */ launch_worker_thread(); } |