Thread (1 message) 1 message, 1 author, 2011-05-05
DORMANTno replies

[PATCH v2] net/fec: fix compile error introduced by dt support

From: Shawn Guo <hidden>
Date: 2011-05-05 15:18:13
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

After fec dt support is added, the following compile error will be
seen when building a pure non-dt kernel.

drivers/net/fec.c: In function ‘fec_probe’:
drivers/net/fec.c:1383: error: implicit declaration of function ‘of_match_device’
drivers/net/fec.c:1383: warning: assignment makes pointer from integer without a cast

This patch is to fix the error.

Signed-off-by: Shawn Guo <redacted>
---
Changes since v1:
 * Use of_match pointer newly added to struct device to fix the error

 drivers/net/fec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 65112a1..40b2a26 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1376,7 +1376,7 @@ fec_probe(struct platform_device *pdev)
 	struct resource *r;
 	const struct of_device_id *of_id;
 
-	of_id = of_match_device(fec_dt_ids, &pdev->dev);
+	of_id = pdev->dev.of_match;
 	if (of_id)
 		pdev->id_entry = (struct platform_device_id *)of_id->data;
 
-- 
1.7.4.1

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help