summaryrefslogtreecommitdiff
path: root/drivers/dax/dax-private.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-07-12 17:58:21 -0700
committerDan Williams <dan.j.williams@intel.com>2019-01-06 21:24:46 -0800
commit51cf784c42d07fbd62cb604836a9270cf3361509 (patch)
tree808f5603d9f6f71f7727b33224d1a79cd958e99c /drivers/dax/dax-private.h
parent753a0850e707e9a8c5861356222f9b9e4eba7945 (diff)
device-dax: Start defining a dax bus model
Towards eliminating the dax_class, move the dax-device-attribute enabling to a new bus.c file in the core. The amount of code thrash of sub-sequent patches is reduced as no logic changes are made, just pure code movement. A temporary export of unregister_dex_dax() and dax_attribute_groups is needed to preserve compilation, but those symbols become static again in a follow-on patch. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax/dax-private.h')
-rw-r--r--drivers/dax/dax-private.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.h
index dbd077653b5c..620c3f4eefe7 100644
--- a/drivers/dax/dax-private.h
+++ b/drivers/dax/dax-private.h
@@ -16,6 +16,15 @@
#include <linux/device.h>
#include <linux/cdev.h>
+/* private routines between core files */
+struct dax_device;
+struct dax_device *inode_dax(struct inode *inode);
+struct inode *dax_inode(struct dax_device *dax_dev);
+
+/* temporary until devm_create_dax_dev moves to bus.c */
+extern const struct attribute_group *dax_attribute_groups[];
+void unregister_dev_dax(void *dev);
+
/**
* struct dax_region - mapping infrastructure for dax devices
* @id: kernel-wide unique region for a memory range
@@ -45,4 +54,9 @@ struct dev_dax {
struct dax_device *dax_dev;
struct device dev;
};
+
+static inline struct dev_dax *to_dev_dax(struct device *dev)
+{
+ return container_of(dev, struct dev_dax, dev);
+}
#endif