Date: Thu, 9 Apr 2009 07:45:24 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190863 - head/sys/dev/hptmv Message-ID: <200904090745.n397jOSh094108@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Thu Apr 9 07:45:23 2009 New Revision: 190863 URL: http://svn.freebsd.org/changeset/base/190863 Log: Use DEVICE_SHUTDOWN(9) mechanism for shutdown handler. Suggested by: jhb Modified: head/sys/dev/hptmv/entry.c Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Thu Apr 9 07:23:40 2009 (r190862) +++ head/sys/dev/hptmv/entry.c Thu Apr 9 07:45:23 2009 (r190863) @@ -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(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904090745.n397jOSh094108>