diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-04-10 17:58:24 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-05-05 09:18:24 -0400 |
commit | d9e7eb152bb24f06028a0d10b054e39ebdf14f9c (patch) | |
tree | f1d49c35c68aab11a9aa8858d8d95929f22b9463 | |
parent | 1bf1b431d98d7e5b5419876d4c219469e60693e1 (diff) |
iommu/rockchip: Fix build without CONFIG_OF
The rockchip iommu driver references its of_device_id table
from the init function, which fails to build when the table
is undefined:
iommu/rockchip-iommu.c: In function 'rk_iommu_init':
iommu/rockchip-iommu.c:1029:35: error: 'rk_iommu_dt_ids' undeclared (first use in this function)
np = of_find_matching_node(NULL, rk_iommu_dt_ids);
This removes the #ifdef and the corresponding of_match_ptr wrapper
to make it build both with CONFIG_OF enabled or disabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 425061b0f5074 ("iommu/rockchip: Play nice in multi-platform builds")
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/rockchip-iommu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 4015560bf486..cab214544237 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c | |||
@@ -1004,20 +1004,18 @@ static int rk_iommu_remove(struct platform_device *pdev) | |||
1004 | return 0; | 1004 | return 0; |
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | #ifdef CONFIG_OF | ||
1008 | static const struct of_device_id rk_iommu_dt_ids[] = { | 1007 | static const struct of_device_id rk_iommu_dt_ids[] = { |
1009 | { .compatible = "rockchip,iommu" }, | 1008 | { .compatible = "rockchip,iommu" }, |
1010 | { /* sentinel */ } | 1009 | { /* sentinel */ } |
1011 | }; | 1010 | }; |
1012 | MODULE_DEVICE_TABLE(of, rk_iommu_dt_ids); | 1011 | MODULE_DEVICE_TABLE(of, rk_iommu_dt_ids); |
1013 | #endif | ||
1014 | 1012 | ||
1015 | static struct platform_driver rk_iommu_driver = { | 1013 | static struct platform_driver rk_iommu_driver = { |
1016 | .probe = rk_iommu_probe, | 1014 | .probe = rk_iommu_probe, |
1017 | .remove = rk_iommu_remove, | 1015 | .remove = rk_iommu_remove, |
1018 | .driver = { | 1016 | .driver = { |
1019 | .name = "rk_iommu", | 1017 | .name = "rk_iommu", |
1020 | .of_match_table = of_match_ptr(rk_iommu_dt_ids), | 1018 | .of_match_table = rk_iommu_dt_ids, |
1021 | }, | 1019 | }, |
1022 | }; | 1020 | }; |
1023 | 1021 | ||