diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-03-14 19:25:08 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-03-15 07:18:47 -0700 |
commit | d812b0d500040b8c7b9c7a93f29be0a010eb09d1 (patch) | |
tree | c3577cd35b354763e407660db01f84bc292d5e84 /drivers | |
parent | 03e908437d007d8a8583c4ea19c737fff2ef6edc (diff) | |
download | linux-d812b0d500040b8c7b9c7a93f29be0a010eb09d1.tar.bz2 |
device-dax: 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')
-rw-r--r-- | drivers/dax/pmem.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index f7c0137e9325..fd49b24fd6af 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c @@ -150,17 +150,7 @@ static struct nd_device_driver dax_pmem_driver = { .type = ND_DRIVER_DAX_PMEM, }; -static int __init dax_pmem_init(void) -{ - return nd_driver_register(&dax_pmem_driver); -} -module_init(dax_pmem_init); - -static void __exit dax_pmem_exit(void) -{ - driver_unregister(&dax_pmem_driver.drv); -} -module_exit(dax_pmem_exit); +module_nd_driver(dax_pmem_driver); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Intel Corporation"); |