From patchwork Tue Jun 25 15:54:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2777801 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 258F59F3A0 for ; Tue, 25 Jun 2013 15:58:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03B81201BE for ; Tue, 25 Jun 2013 15:58:31 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C64AF20198 for ; Tue, 25 Jun 2013 15:58:29 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5PFvLl4021783; Tue, 25 Jun 2013 10:57:21 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5PFvLIx006049; Tue, 25 Jun 2013 10:57:21 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Tue, 25 Jun 2013 10:57:20 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5PFvKRJ006154; Tue, 25 Jun 2013 10:57:20 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6720A8062D; Tue, 25 Jun 2013 10:57:20 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 7285680626 for ; Tue, 25 Jun 2013 10:55:39 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5PFtdUq009338 for ; Tue, 25 Jun 2013 10:55:39 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5PFtcBH016292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Jun 2013 10:55:39 -0500 Received: from [216.82.253.67:33534] by server-10.bemta-7.messagelabs.com id 60/2B-09484-A7DB9C15; Tue, 25 Jun 2013 15:55:38 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-5.tower-158.messagelabs.com!1372175737!12074613!1 X-Originating-IP: [209.85.220.50] X-SpamReason: No, hits=0.7 required=7.0 tests=BODY_RANDOM_LONG, ML_RADAR_SPEW_LINKS_14,RCVD_ILLEGAL_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30664 invoked from network); 25 Jun 2013 15:55:38 -0000 Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by server-5.tower-158.messagelabs.com with RC4-SHA encrypted SMTP; 25 Jun 2013 15:55:38 -0000 Received: by mail-pa0-f50.google.com with SMTP id fb1so12890684pad.37 for ; Tue, 25 Jun 2013 08:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=EgQXBELQfoLWnKi7fRJUwtm6vj3oRgxwJtfoi6Z34p0=; b=F/IdpXBljK378w9pQ5VQe4x0RiuyGyM3PKH6nzk7iItHhMNJEPKtfhHPyq9Ztx20gn U9Y6Sjyy2KeTxMxAZ+evxHupOxzSA4y7o8sF7qJrhHFs5TfVbLzYUL6XP8MxCwVl7Fa7 DvPxKySrq6/TisQiGv5CXeEAo3gOP1A8MKg0r15M/jKJOpKWXAAZxB1vH/c9i+BkPTo9 R64WabWjLaR2NOqIhJdKuXRMVztMvwrGZZ4q5sKD1/JlJR+9dByFrA+FJwO9gLj9iGcj tJI2Iz4qlkuAAaNcm6IrzSwYaYbpBZgZUG5CFNzj29OlUVFkTTTrmHH5PIDO48Uror/r emKg== X-Received: by 10.68.244.73 with SMTP id xe9mr29574769pbc.119.1372175737238; Tue, 25 Jun 2013 08:55:37 -0700 (PDT) Received: from localhost.localdomain ([1.23.213.228]) by mx.google.com with ESMTPSA id fl2sm25799937pab.23.2013.06.25.08.55.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 08:55:36 -0700 (PDT) From: Prabhakar Lad To: David Miller , Subject: [PATCH v2 3/3] net: davinci_mdio: gaurd the DT code with IS_ENABLED(CONFIG_OF) Date: Tue, 25 Jun 2013 21:24:53 +0530 Message-ID: <1372175693-20318-4-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1372175693-20318-1-git-send-email-prabhakar.csengg@gmail.com> References: <1372175693-20318-1-git-send-email-prabhakar.csengg@gmail.com> CC: Mugunthan V N , DLOS , LKML X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Lad, Prabhakar" guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt() with CONFIG_OF. Signed-off-by: Lad, Prabhakar --- drivers/net/ethernet/ti/davinci_mdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index c47f0db..dac6f58 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -291,6 +291,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id, return 0; } +#if IS_ENABLED(CONFIG_OF) static int davinci_mdio_probe_dt(struct mdio_platform_data *data, struct platform_device *pdev) { @@ -308,7 +309,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data, return 0; } - +#endif static int davinci_mdio_probe(struct platform_device *pdev) { @@ -477,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = { .resume_early = davinci_mdio_resume, }; +#if IS_ENABLED(CONFIG_OF) static const struct of_device_id davinci_mdio_of_mtable[] = { { .compatible = "ti,davinci_mdio", }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable); +#endif static struct platform_driver davinci_mdio_driver = { .driver = {