diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-03-15 21:37:17 (GMT) |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-04-05 11:25:12 (GMT) |
commit | b70bb984489363aadd5ccc94d919629d9e264d36 (patch) | |
tree | 1702a24fdcb57873048a56692b1a9e18d9e99009 /drivers | |
parent | 9735a22799b9214d17d3c231fe377fc852f042e9 (diff) | |
download | linux-b70bb984489363aadd5ccc94d919629d9e264d36.tar.xz |
iommu: provide of_xlate pointer unconditionally
iommu drivers that support the standard DT bindings use a of_xlate
callback pointer, but that is only part of struct iommu_ops when
CONFIG_OF_IOMMU is enabled, leading to build errors in randconfig
builds when that is not provided:
drivers/iommu/mtk_iommu.c:497:2: error: unknown field 'of_xlate' specified in initializer
.of_xlate = mtk_iommu_of_xlate,
^
drivers/iommu/mtk_iommu.c:497:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.of_xlate = mtk_iommu_of_xlate,
^~~~~~~~~~~~~~~~~~
drivers/iommu/mtk_iommu.c:497:14: note: (near initialization for 'mtk_iommu_ops.domain_get_attr')
We can work around it by adding more #ifdefs in each driver, but
it seems nicer to just allow setting the pointer even if it is
unused. This makes the driver code look nicer, and it gives better
compile-time coverage when test building on other architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 0df4fabe208d ("iommu/mediatek: Add mt8173 IOMMU driver")
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions