diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-02-16 15:40:25 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-03-01 13:46:57 +0100 |
commit | b42a905b6aad40c092cf17f4b295a4c389bc7206 (patch) | |
tree | b2a098462564665e16d69d9ad22f8a2a5857b0c3 /include/linux/iommu.h | |
parent | e70e9ecd7cb349d00736c594b8e9bada0a762238 (diff) |
iommu: constify of_phandle_args in xlate
The xlate callbacks are supposed to translate of_phandle_args to proper
provider without modifying the of_phandle_args. Make the argument
pointer to const for code safety and readability.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240216144027.185959-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r-- | include/linux/iommu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7cc56cfe98dd..98a958621dcb 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -567,7 +567,7 @@ struct iommu_ops { /* Request/Free a list of reserved regions for a device */ void (*get_resv_regions)(struct device *dev, struct list_head *list); - int (*of_xlate)(struct device *dev, struct of_phandle_args *args); + int (*of_xlate)(struct device *dev, const struct of_phandle_args *args); bool (*is_attach_deferred)(struct device *dev); /* Per device IOMMU features */ @@ -985,7 +985,7 @@ struct iommu_mm_data { int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode, const struct iommu_ops *ops); void iommu_fwspec_free(struct device *dev); -int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids); +int iommu_fwspec_add_ids(struct device *dev, const u32 *ids, int num_ids); const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode); static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) |