From patchwork Thu Mar 21 08:23:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 2311401 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2E2B1E00E6 for ; Thu, 21 Mar 2013 08:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793Ab3CUIXW (ORCPT ); Thu, 21 Mar 2013 04:23:22 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:65238 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757948Ab3CUIXS (ORCPT ); Thu, 21 Mar 2013 04:23:18 -0400 Received: by mail-la0-f50.google.com with SMTP id ec20so4651904lab.37 for ; Thu, 21 Mar 2013 01:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=X1KOeSVBSF39Bvj6M9dCf/PLnUcnOqbSmw5HrSJvlOQ=; b=Eh4+B18xVR2Ty/q40o0o269FBrLnVdvHP7fSR+NTHf5/21Sd88k1k4g+WN3dR8ljW+ 7H4oLsYP+rYPxhMQcM8e60dLveHuwbfyyti3qo/0jLFP+EAv9KBk7sv4fy7yQs9aGnnK 2Z1ASXQCE0AvRp8IUVhVMnL/D38iu9tKkacAfCJeOLRWCbeIqJWyCtN7BTyjtdJIGroV odQOQXD5nWKjOwMmRcL8lWlYKI52kLD2FF+n43GwE9sXmAKAM0ODQiZcjq6HGaiBX9uq YLainlqoLa+igLNIWNpPYvFOIBvTPOK0utFkQxvN6hB6exyuMZ13+2dQjNy7Olt8D+Zh 2iRA== X-Received: by 10.112.103.33 with SMTP id ft1mr11126308lbb.48.1363854196779; Thu, 21 Mar 2013 01:23:16 -0700 (PDT) Received: from localhost (swsoft-msk-nat.sw.ru. [195.214.232.10]) by mx.google.com with ESMTPS id fm8sm1689750lbb.17.2013.03.21.01.23.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 21 Mar 2013 01:23:15 -0700 (PDT) Subject: [PATCH RFC 5/5] e1000e: make PTP clock optional To: Michal Marek , Andrew Morton , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org From: Konstantin Khlebnikov Cc: Tejun Heo , Greg Kroah-Hartman , Richard Cochran Date: Thu, 21 Mar 2013 12:23:13 +0400 Message-ID: <20130321082313.21557.43970.stgit@zurg> In-Reply-To: <20130321082256.21557.68351.stgit@zurg> References: <20130321082256.21557.68351.stgit@zurg> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org As proof of concept for new approach in managing cross-module dependencies this patch resolves hard depencency between CONFIG_E1000E and CONFIG_PTP_1588_CLOCK. Signed-off-by: Konstantin Khlebnikov Cc: Richard Cochran --- drivers/net/ethernet/intel/Kconfig | 2 +- drivers/net/ethernet/intel/e1000e/Makefile | 3 ++- drivers/net/ethernet/intel/e1000e/e1000.h | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 05f7264..4df239b 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig @@ -69,7 +69,7 @@ config E1000E tristate "Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support" depends on PCI && (!SPARC32 || BROKEN) select CRC32 - select PTP_1588_CLOCK + apply PTP_1588_CLOCK ---help--- This driver supports the PCI-Express Intel(R) PRO/1000 gigabit ethernet family of adapters. For PCI or PCI-X e1000 adapters, diff --git a/drivers/net/ethernet/intel/e1000e/Makefile b/drivers/net/ethernet/intel/e1000e/Makefile index c2dcfcc..9c67c05 100644 --- a/drivers/net/ethernet/intel/e1000e/Makefile +++ b/drivers/net/ethernet/intel/e1000e/Makefile @@ -34,5 +34,6 @@ obj-$(CONFIG_E1000E) += e1000e.o e1000e-objs := 82571.o ich8lan.o 80003es2lan.o \ mac.o manage.o nvm.o phy.o \ - param.o ethtool.o netdev.o ptp.o + param.o ethtool.o netdev.o +e1000e-$(CONFIG_PTP_1588_CLOCK) := ptp.o diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index fcc7581..c2819c0 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h @@ -510,8 +510,13 @@ extern const struct e1000_info e1000_pch2_info; extern const struct e1000_info e1000_pch_lpt_info; extern const struct e1000_info e1000_es2_info; +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK) extern void e1000e_ptp_init(struct e1000_adapter *adapter); extern void e1000e_ptp_remove(struct e1000_adapter *adapter); +#else +static inline void e1000e_ptp_init(struct e1000_adapter *adapter) { } +static inline void e1000e_ptp_remove(struct e1000_adapter *adapter) { } +#endif static inline s32 e1000_phy_hw_reset(struct e1000_hw *hw) {