[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180314182508.10351-3-jthumshirn@suse.de>
Date: Wed, 14 Mar 2018 19:25:07 +0100
From: Johannes Thumshirn <jthumshirn@...e.de>
To: Dan Williams <dan.j.williams@...el.com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc: Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
Linux NV-DIMM Mailing List <linux-nvdimm@...ts.01.org>,
Johannes Thumshirn <jthumshirn@...e.de>
Subject: [PATCH 2/3] libnvdimm, pmem: use module_nd_driver
Use module_nd_driver() instead of having module_init() and
module_exit() callbacks which just call nd_driver_register() and
nd_driver_unregister().
Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
---
drivers/nvdimm/pmem.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 06f8dcc52ca6..d8ab882be790 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -547,17 +547,7 @@ static struct nd_device_driver nd_pmem_driver = {
.type = ND_DRIVER_NAMESPACE_IO | ND_DRIVER_NAMESPACE_PMEM,
};
-static int __init pmem_init(void)
-{
- return nd_driver_register(&nd_pmem_driver);
-}
-module_init(pmem_init);
-
-static void pmem_exit(void)
-{
- driver_unregister(&nd_pmem_driver.drv);
-}
-module_exit(pmem_exit);
+module_nd_driver(nd_pmem_driver);
MODULE_AUTHOR("Ross Zwisler <ross.zwisler@...ux.intel.com>");
MODULE_LICENSE("GPL v2");
--
2.13.6
Powered by blists - more mailing lists