1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2016 - 2018 Intel Corporation. All rights reserved. */
3 #include <linux/percpu-refcount.h>
4 #include <linux/memremap.h>
5 #include <linux/module.h>
6 #include <linux/pfn_t.h>
10 static int dax_pmem_probe(struct device
*dev
)
12 return PTR_ERR_OR_ZERO(__dax_pmem_probe(dev
, DEV_DAX_BUS
));
15 static struct nd_device_driver dax_pmem_driver
= {
16 .probe
= dax_pmem_probe
,
20 .type
= ND_DRIVER_DAX_PMEM
,
23 static int __init
dax_pmem_init(void)
25 return nd_driver_register(&dax_pmem_driver
);
27 module_init(dax_pmem_init
);
29 static void __exit
dax_pmem_exit(void)
31 driver_unregister(&dax_pmem_driver
.drv
);
33 module_exit(dax_pmem_exit
);
35 MODULE_LICENSE("GPL v2");
36 MODULE_AUTHOR("Intel Corporation");
37 #if !IS_ENABLED(CONFIG_DEV_DAX_PMEM_COMPAT)
38 /* For compat builds, don't load this module by default */
39 MODULE_ALIAS_ND_DEVICE(ND_DEVICE_DAX_PMEM
);