[PATCH] iommu: Fix incompatible arg type passed to iommu_get/put_resv_regions

From: Manoj Iyer
Date: Fri May 05 2017 - 18:39:36 EST


Argument to iommu_get/put_resv_regions function in
iommu_get_group_resv_regions function expects a struct device *
as first argument, struct device is passed instead.

Commit 39ab9555c241 ("iommu: Add sysfs bindings for struct iommu_device")
in linux-next adds struct device dev to struct iommu_device instead of
struct device * but the code in drivers/iommu/iommu.c was not refactored
to take this change into account.

Signed-off-by: Manoj Iyer <manoj.iyer@xxxxxxxxxxxxx>
---
drivers/iommu/iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index cf7ca7e70777..d9f585160c0b 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -259,9 +259,9 @@ int iommu_get_group_resv_regions(struct iommu_group *group,
struct list_head dev_resv_regions;

INIT_LIST_HEAD(&dev_resv_regions);
- iommu_get_resv_regions(device->dev, &dev_resv_regions);
+ iommu_get_resv_regions(&device->dev, &dev_resv_regions);
ret = iommu_insert_device_resv_regions(&dev_resv_regions, head);
- iommu_put_resv_regions(device->dev, &dev_resv_regions);
+ iommu_put_resv_regions(&device->dev, &dev_resv_regions);
if (ret)
break;
}
--
2.11.0