From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Michal Marek <mmarek@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Cc: Tejun Heo <tj@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Richard Cochran <richardcochran@gmail.com>
Subject: [PATCH RFC 5/5] e1000e: make PTP clock optional
Date: Thu, 21 Mar 2013 12:23:13 +0400 [thread overview]
Message-ID: <20130321082313.21557.43970.stgit@zurg> (raw)
In-Reply-To: <20130321082256.21557.68351.stgit@zurg>
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 <khlebnikov@openvz.org>
Cc: Richard Cochran <richardcochran@gmail.com>
---
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(-)
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)
{
next prev parent reply other threads:[~2013-03-21 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 8:22 [PATCH RFC 1/5] kconfig: implement weak reverse-dependencies Konstantin Khlebnikov
2013-03-21 8:23 ` [PATCH RFC 2/5] kconfig: regen parser Konstantin Khlebnikov
2013-03-21 8:23 ` [PATCH RFC 3/5] kconfig: simplity linking cross-module glue objects Konstantin Khlebnikov
2013-03-21 8:23 ` [PATCH RFC 4/5] ptp: add stub function for ptp_clock_index() Konstantin Khlebnikov
2013-03-21 8:23 ` Konstantin Khlebnikov [this message]
2013-03-21 10:22 ` [PATCH RFC 1/5] kconfig: implement weak reverse-dependencies Richard Cochran
2013-03-21 11:06 ` Konstantin Khlebnikov
2013-03-21 11:43 ` Richard Cochran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130321082313.21557.43970.stgit@zurg \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=richardcochran@gmail.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox