summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mscc/Makefile
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2020-03-13 12:48:01 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-15 07:06:45 +0300
commitfa164e40c53b3811bb3a83c47eabbdf345e21e5e (patch)
treebb56c016a125708faac9f6e8f992a1837516e3e4 /drivers/net/phy/mscc/Makefile
parentda80aa52d07462850f02c19631a918995f9f11f4 (diff)
downloadlinux-fa164e40c53b3811bb3a83c47eabbdf345e21e5e.tar.xz
net: phy: mscc: split the driver into separate files
This patch splits the MSCC driver into separate files, per functionality, to improve readability and maintenance as the codebase grew a lot. The MACsec code is moved to a dedicated mscc_macsec.c file, the mscc.c file is renamed to mscc_main.c to keep the driver binary to be named mscc and common definition are put into a new mscc.h header. Most of the code was just moved around, except for a few exceptions: - Header inclusions were reworked to only keep what's needed. - Three helpers were created in the MACsec code, to avoid #ifdef's in the main C file: vsc8584_macsec_init, vsc8584_handle_macsec_interrupt and vsc8584_config_macsec_intr. The patch should not introduce any functional modification. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mscc/Makefile')
-rw-r--r--drivers/net/phy/mscc/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/phy/mscc/Makefile b/drivers/net/phy/mscc/Makefile
index e419ed1a3213..10af42cd9839 100644
--- a/drivers/net/phy/mscc/Makefile
+++ b/drivers/net/phy/mscc/Makefile
@@ -2,4 +2,9 @@
#
# Makefile for MSCC networking PHY driver
-obj-$(CONFIG_MICROSEMI_PHY) += mscc.o
+obj-$(CONFIG_MICROSEMI_PHY) := mscc.o
+mscc-objs := mscc_main.o
+
+ifdef CONFIG_MACSEC
+mscc-objs += mscc_macsec.o
+endif