From patchwork Thu May 16 07:30:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 244235 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E11C02C007E for ; Thu, 16 May 2013 17:31:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755896Ab3EPHbg (ORCPT ); Thu, 16 May 2013 03:31:36 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:53376 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755878Ab3EPHbd (ORCPT ); Thu, 16 May 2013 03:31:33 -0400 Received: by mail-pb0-f52.google.com with SMTP id xa7so2071256pbc.39 for ; Thu, 16 May 2013 00:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=2tE2yxCNfgpi2OC03RlwHxVNhsImtcUe/aR6GPrdmuk=; b=miuO+FdqGE7J89EnmO+cPuJgrZMsL8d+OVR557Di4DJaTKdl8EH41anASEGTEGkUr8 l5r176mW564klwHPqyGfePfw0UP7CDK2IofoXNs/v5gWgb7sm0FuC7ZcSYXoYxPat1l9 1LAOalo4i/9213mbrAGgCNJhQCBODpGd7K0Gmig1B0IOkkGhTAS0kL185bEG3QBiv2Zc W10n1Jx76NKy3yMkcI5nau7F22atp+wM/hHFZSGJKSjQ2hX/42na3nY8Ts9FoEHvXDE9 kZg2vR/xswiAKeaZqnFqsak7PXrTvb3/uOyl1FmvU50g0b8zdzWL5vz9D6B84EDnqXCX 2bCQ== X-Received: by 10.68.202.7 with SMTP id ke7mr41353936pbc.82.1368689492995; Thu, 16 May 2013 00:31:32 -0700 (PDT) Received: from localhost.localdomain ([59.98.240.128]) by mx.google.com with ESMTPSA id 10sm5737003pbr.45.2013.05.16.00.31.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 16 May 2013 00:31:32 -0700 (PDT) From: Lad Prabhakar To: DLOS , "David S. Miller" , Jiri Kosina , , Mugunthan V N Cc: LKML , "Lad, Prabhakar" Subject: [PATCH 5/5] net: davinci_mdio: trivial cleanup Date: Thu, 16 May 2013 13:00:38 +0530 Message-Id: <1368689438-23889-6-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1368689438-23889-1-git-send-email-prabhakar.csengg@gmail.com> References: <1368689438-23889-1-git-send-email-prabhakar.csengg@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Lad, Prabhakar remove unwanted header inclusion and sort the alphabetically also 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 | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index 12aec17..bc6cfec 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -24,20 +24,16 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * --------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include + #include -#include -#include -#include #include +#include +#include +#include #include -#include +#include +#include +#include /* * This timeout definition is a worst-case ultra defensive measure against @@ -291,6 +287,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 +305,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data, return 0; } - +#endif static int davinci_mdio_probe(struct platform_device *pdev) { @@ -481,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = { .resume = 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 = {