From patchwork Thu May 5 15:18:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1362 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:51:23 -0000 Delivered-To: patches@linaro.org Received: by 10.224.184.145 with SMTP id ck17cs101562qab; Thu, 5 May 2011 08:12:02 -0700 (PDT) Received: by 10.68.36.168 with SMTP id r8mr3269702pbj.16.1304608321640; Thu, 05 May 2011 08:12:01 -0700 (PDT) Received: from mail-pv0-f178.google.com (mail-pv0-f178.google.com [74.125.83.178]) by mx.google.com with ESMTPS id x9si6357206pbj.255.2011.05.05.08.12.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 May 2011 08:12:01 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=74.125.83.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by pvg7 with SMTP id 7so1340288pvg.37 for ; Thu, 05 May 2011 08:12:01 -0700 (PDT) Received: by 10.68.31.104 with SMTP id z8mr3489270pbh.220.1304608320848; Thu, 05 May 2011 08:12:00 -0700 (PDT) Received: from localhost.localdomain ([114.216.159.114]) by mx.google.com with ESMTPS id d9sm1491742pba.16.2011.05.05.08.11.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 May 2011 08:11:59 -0700 (PDT) From: Shawn Guo To: devicetree-discuss@lists.ozlabs.org Cc: linaro-kerenl@lists.linaro.org, patches@linaro.org, Shawn Guo Subject: [PATCH v2] net/fec: fix compile error introduced by dt support Date: Thu, 5 May 2011 23:18:13 +0800 Message-Id: <1304608693-28943-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <20110405045400.GA28956@ponder.secretlab.ca> References: <20110405045400.GA28956@ponder.secretlab.ca> MIME-Version: 1.0 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 --- 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;