diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-03-14 21:25:07 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-03-15 17:18:06 +0300 |
commit | 03e908437d007d8a8583c4ea19c737fff2ef6edc (patch) | |
tree | 0ed653cd4969f1c7ab06a8359bf1604362feaf10 /drivers/nvdimm | |
parent | 71cfdd0bad3ad91680e6b82cac634154cf56376e (diff) | |
download | linux-03e908437d007d8a8583c4ea19c737fff2ef6edc.tar.xz |
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@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/pmem.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 906d31e56261..85dfb3dc3981 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@linux.intel.com>"); MODULE_LICENSE("GPL v2"); |