Skip to content

Commit

Permalink
device-dax: use module_nd_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Thumshirn authored and Dan Williams committed Mar 15, 2018
1 parent 03e9084 commit d812b0d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/dax/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit d812b0d

Please sign in to comment.