linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: rockchip: fix build without CONFIG_OF
@ 2015-04-10 21:58 Arnd Bergmann
  2015-04-13 10:10 ` Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-04-10 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

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")

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)
 	return 0;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id rk_iommu_dt_ids[] = {
 	{ .compatible = "rockchip,iommu" },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, rk_iommu_dt_ids);
-#endif
 
 static struct platform_driver rk_iommu_driver = {
 	.probe = rk_iommu_probe,
 	.remove = rk_iommu_remove,
 	.driver = {
 		   .name = "rk_iommu",
-		   .of_match_table = of_match_ptr(rk_iommu_dt_ids),
+		   .of_match_table = rk_iommu_dt_ids,
 	},
 };
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] iommu: rockchip: fix build without CONFIG_OF
  2015-04-10 21:58 [PATCH] iommu: rockchip: fix build without CONFIG_OF Arnd Bergmann
@ 2015-04-13 10:10 ` Thierry Reding
  2015-04-17 20:01 ` Heiko Stübner
  2015-05-05 13:19 ` Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-04-13 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 10, 2015 at 11:58:24PM +0200, Arnd Bergmann wrote:
> 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")

How can this even happen? Rockchip depends on multiplatform, and
multiplatform pulls in OF. Ah... COMPILE_TEST... oh well.

Reviewed-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150413/14d922ea/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] iommu: rockchip: fix build without CONFIG_OF
  2015-04-10 21:58 [PATCH] iommu: rockchip: fix build without CONFIG_OF Arnd Bergmann
  2015-04-13 10:10 ` Thierry Reding
@ 2015-04-17 20:01 ` Heiko Stübner
  2015-05-05 13:19 ` Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stübner @ 2015-04-17 20:01 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag, 10. April 2015, 23:58:24 schrieb Arnd Bergmann:
> 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")

not sure if another one is needed, but nevertheless

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] iommu: rockchip: fix build without CONFIG_OF
  2015-04-10 21:58 [PATCH] iommu: rockchip: fix build without CONFIG_OF Arnd Bergmann
  2015-04-13 10:10 ` Thierry Reding
  2015-04-17 20:01 ` Heiko Stübner
@ 2015-05-05 13:19 ` Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2015-05-05 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 10, 2015 at 11:58:24PM +0200, Arnd Bergmann wrote:
> 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")

Applied to iommu/fixes, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-05 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 21:58 [PATCH] iommu: rockchip: fix build without CONFIG_OF Arnd Bergmann
2015-04-13 10:10 ` Thierry Reding
2015-04-17 20:01 ` Heiko Stübner
2015-05-05 13:19 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).