diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-06-26 02:39:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-27 11:03:21 -0700 |
commit | 3d64ea387cc3ba884f9d2b5c41a8625d48deb933 (patch) | |
tree | f619e80b1a84d641fe3ee5c152847de3458c5b55 /drivers/net/dsa/sja1105 | |
parent | c881e10e3f47df8a403c23589f204816bfb2a41d (diff) | |
download | linux-stable-3d64ea387cc3ba884f9d2b5c41a8625d48deb933.tar.gz linux-stable-3d64ea387cc3ba884f9d2b5c41a8625d48deb933.tar.bz2 linux-stable-3d64ea387cc3ba884f9d2b5c41a8625d48deb933.zip |
net: dsa: sja1105: Build PTP support in main DSA driver
As Arnd Bergmann pointed out in commit 78fe8a28fb96 ("net: dsa: sja1105:
fix ptp link error"), there is no point in having PTP support as a
separate loadable kernel module.
So remove the exported symbols and make sja1105.ko contain PTP support
or not based on CONFIG_NET_DSA_SJA1105_PTP.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105')
-rw-r--r-- | drivers/net/dsa/sja1105/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_ptp.c | 12 | ||||
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_spi.c | 2 | ||||
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_static_config.c | 3 |
4 files changed, 1 insertions, 18 deletions
diff --git a/drivers/net/dsa/sja1105/Makefile b/drivers/net/dsa/sja1105/Makefile index 9a22f68b39e9..4483113e6259 100644 --- a/drivers/net/dsa/sja1105/Makefile +++ b/drivers/net/dsa/sja1105/Makefile @@ -10,5 +10,5 @@ sja1105-objs := \ sja1105_dynamic_config.o \ ifdef CONFIG_NET_DSA_SJA1105_PTP -obj-$(CONFIG_NET_DSA_SJA1105) += sja1105_ptp.o +sja1105-objs += sja1105_ptp.o endif diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.c b/drivers/net/dsa/sja1105/sja1105_ptp.c index 3041cf9d5856..c7ce1edd8471 100644 --- a/drivers/net/dsa/sja1105/sja1105_ptp.c +++ b/drivers/net/dsa/sja1105/sja1105_ptp.c @@ -77,7 +77,6 @@ int sja1105_get_ts_info(struct dsa_switch *ds, int port, info->phc_index = ptp_clock_index(priv->clock); return 0; } -EXPORT_SYMBOL_GPL(sja1105_get_ts_info); int sja1105et_ptp_cmd(const void *ctx, const void *data) { @@ -95,7 +94,6 @@ int sja1105et_ptp_cmd(const void *ctx, const void *data) return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control, buf, SJA1105_SIZE_PTP_CMD); } -EXPORT_SYMBOL_GPL(sja1105et_ptp_cmd); int sja1105pqrs_ptp_cmd(const void *ctx, const void *data) { @@ -113,7 +111,6 @@ int sja1105pqrs_ptp_cmd(const void *ctx, const void *data) return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control, buf, SJA1105_SIZE_PTP_CMD); } -EXPORT_SYMBOL_GPL(sja1105pqrs_ptp_cmd); /* The switch returns partial timestamps (24 bits for SJA1105 E/T, which wrap * around in 0.135 seconds, and 32 bits for P/Q/R/S, wrapping around in 34.35 @@ -146,7 +143,6 @@ u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv, u64 now, return ts_reconstructed; } -EXPORT_SYMBOL_GPL(sja1105_tstamp_reconstruct); /* Reads the SPI interface for an egress timestamp generated by the switch * for frames sent using management routes. @@ -219,7 +215,6 @@ int sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts) return 0; } -EXPORT_SYMBOL_GPL(sja1105_ptpegr_ts_poll); int sja1105_ptp_reset(struct sja1105_private *priv) { @@ -240,7 +235,6 @@ int sja1105_ptp_reset(struct sja1105_private *priv) return rc; } -EXPORT_SYMBOL_GPL(sja1105_ptp_reset); static int sja1105_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) @@ -387,7 +381,6 @@ int sja1105_ptp_clock_register(struct sja1105_private *priv) return sja1105_ptp_reset(priv); } -EXPORT_SYMBOL_GPL(sja1105_ptp_clock_register); void sja1105_ptp_clock_unregister(struct sja1105_private *priv) { @@ -397,8 +390,3 @@ void sja1105_ptp_clock_unregister(struct sja1105_private *priv) ptp_clock_unregister(priv->clock); priv->clock = NULL; } -EXPORT_SYMBOL_GPL(sja1105_ptp_clock_unregister); - -MODULE_AUTHOR("Vladimir Oltean <olteanv@gmail.com>"); -MODULE_DESCRIPTION("SJA1105 PHC Driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/net/dsa/sja1105/sja1105_spi.c b/drivers/net/dsa/sja1105/sja1105_spi.c index f7e51debb930..84dc603138cf 100644 --- a/drivers/net/dsa/sja1105/sja1105_spi.c +++ b/drivers/net/dsa/sja1105/sja1105_spi.c @@ -100,7 +100,6 @@ int sja1105_spi_send_packed_buf(const struct sja1105_private *priv, return 0; } -EXPORT_SYMBOL_GPL(sja1105_spi_send_packed_buf); /* If @rw is: * - SPI_WRITE: creates and sends an SPI write message at absolute @@ -136,7 +135,6 @@ int sja1105_spi_send_int(const struct sja1105_private *priv, return rc; } -EXPORT_SYMBOL_GPL(sja1105_spi_send_int); /* Should be used if a @packed_buf larger than SJA1105_SIZE_SPI_MSG_MAXLEN * must be sent/received. Splitting the buffer into chunks and assembling diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.c b/drivers/net/dsa/sja1105/sja1105_static_config.c index 58f273eaf1ea..242f001c59fe 100644 --- a/drivers/net/dsa/sja1105/sja1105_static_config.c +++ b/drivers/net/dsa/sja1105/sja1105_static_config.c @@ -35,7 +35,6 @@ void sja1105_pack(void *buf, const u64 *val, int start, int end, size_t len) } dump_stack(); } -EXPORT_SYMBOL_GPL(sja1105_pack); void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len) { @@ -53,7 +52,6 @@ void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len) start, end); dump_stack(); } -EXPORT_SYMBOL_GPL(sja1105_unpack); void sja1105_packing(void *buf, u64 *val, int start, int end, size_t len, enum packing_op op) @@ -76,7 +74,6 @@ void sja1105_packing(void *buf, u64 *val, int start, int end, } dump_stack(); } -EXPORT_SYMBOL_GPL(sja1105_packing); /* Little-endian Ethernet CRC32 of data packed as big-endian u32 words */ u32 sja1105_crc32(const void *buf, size_t len) |