This function does not modify its parameter 'dev' and it is not supposed
to do it. Therefore, constify it.
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
return sid < limit;
}
/* Forward declaration */
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev);
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev);
static int arm_smmu_add_device(u8 devfn, struct device *dev)
{
return arm_smmu_iotlb_flush_all(d);
}
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev)
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev)
{
struct arm_smmu_device *smmu = NULL;