Date: Tue, 18 Dec 2012 22:10:40 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244411 - head/sys/dev/nvme Message-ID: <201212182210.qBIMAeSw039637@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Tue Dec 18 22:10:40 2012 New Revision: 244411 URL: http://svnweb.freebsd.org/changeset/base/244411 Log: Simplify module definition by adding nvme_modevent to DRIVER_MODULE() definition. Submitted by: Carl Delsey <carl.r.delsey@intel.com> Modified: head/sys/dev/nvme/nvme.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Tue Dec 18 21:50:48 2012 (r244410) +++ head/sys/dev/nvme/nvme.c Tue Dec 18 22:10:40 2012 (r244411) @@ -53,6 +53,7 @@ MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) m static int nvme_probe(device_t); static int nvme_attach(device_t); static int nvme_detach(device_t); +static int nvme_modevent(module_t mod, int type, void *arg); static devclass_t nvme_devclass; @@ -70,7 +71,7 @@ static driver_t nvme_pci_driver = { sizeof(struct nvme_controller), }; -DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, 0, 0); +DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, nvme_modevent, 0); MODULE_VERSION(nvme, 1); static struct _pcsid @@ -196,14 +197,6 @@ nvme_modevent(module_t mod, int type, vo return (0); } -moduledata_t nvme_mod = { - "nvme", - (modeventhand_t)nvme_modevent, - 0 -}; - -DECLARE_MODULE(nvme, nvme_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); - void nvme_dump_command(struct nvme_command *cmd) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212182210.qBIMAeSw039637>