[PATCH 3/3] device-dax: use module_nd_driver
From: Johannes Thumshirn
Date: Wed Mar 14 2018 - 14:26:00 EST
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@xxxxxxx>
---
drivers/dax/pmem.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c
index 31b6ecce4c64..d927ae82ba0d 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");
--
2.13.6