summaryrefslogtreecommitdiffstats
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-08-28 13:00:44 -0600
committerJens Axboe <axboe@kernel.dk>2017-08-28 13:00:44 -0600
commitcd996fb47c360320cf25ac9503c16de085ea9cfc (patch)
tree38a4730b2c031afe7daf632064f9687f1e09194e /include/linux/iommu.h
parente9a823fb34a8b0fcba6e112aa1003258a1a5af50 (diff)
parentcc4a41fe5541a73019a864883297bd5043aa6d98 (diff)
downloadtalos-obmc-linux-cd996fb47c360320cf25ac9503c16de085ea9cfc.tar.gz
talos-obmc-linux-cd996fb47c360320cf25ac9503c16de085ea9cfc.zip
Merge tag 'v4.13-rc7' into for-4.14/block-postmerge
Linux 4.13-rc7 Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 2cb54adc4a33..176f7569d874 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -240,7 +240,7 @@ struct iommu_device {
struct list_head list;
const struct iommu_ops *ops;
struct fwnode_handle *fwnode;
- struct device dev;
+ struct device *dev;
};
int iommu_device_register(struct iommu_device *iommu);
@@ -265,6 +265,11 @@ static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
iommu->fwnode = fwnode;
}
+static inline struct iommu_device *dev_to_iommu_device(struct device *dev)
+{
+ return (struct iommu_device *)dev_get_drvdata(dev);
+}
+
#define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */
#define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */
#define IOMMU_GROUP_NOTIFY_BIND_DRIVER 3 /* Pre Driver bind */
@@ -589,6 +594,11 @@ static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
{
}
+static inline struct iommu_device *dev_to_iommu_device(struct device *dev)
+{
+ return NULL;
+}
+
static inline void iommu_device_unregister(struct iommu_device *iommu)
{
}
OpenPOWER on IntegriCloud