[PATCH v2] net/fec: fix compile error introduced by dt support
Shawn Guo
shawn.guo at linaro.org
Fri May 6 01:18:13 EST 2011
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 <shawn.guo at linaro.org>
---
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
More information about the devicetree-discuss
mailing list