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.del...@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)
 {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to