From owner-svn-src-all@FreeBSD.ORG Tue Dec 18 22:10:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D12465F; Tue, 18 Dec 2012 22:10:41 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 018B98FC0A; Tue, 18 Dec 2012 22:10:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIMAesh039638; Tue, 18 Dec 2012 22:10:40 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIMAeSw039637; Tue, 18 Dec 2012 22:10:40 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201212182210.qBIMAeSw039637@svn.freebsd.org> From: Jim Harris Date: Tue, 18 Dec 2012 22:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244411 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 22:10:41 -0000 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 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) {