Merge tag 'trace-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux/fpc-iii.git] / drivers / dax / pmem / pmem.c
blob0ae4238a0ef88dd9be32dcea7bef9b2abd8a8331
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>
7 #include <linux/nd.h>
8 #include "../bus.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,
17 .drv = {
18 .name = "dax_pmem",
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);
40 #endif