Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: fix warning same module names

When building with CONFIG_NET_DSA_REALTEK_SMI and CONFIG_REALTEK_PHY
enabled as loadable modules, we see the following warning:

warning: same module names found:
drivers/net/phy/realtek.ko
drivers/net/dsa/realtek.ko

Rework so the driver name is realtek-smi instead of realtek.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Anders Roxell and committed by
David S. Miller
f0c03ee0 ce950f10

+5 -5
+2 -2
drivers/net/dsa/Makefile
··· 9 9 obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o 10 10 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o 11 11 obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o 12 - obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o 13 - realtek-objs := realtek-smi.o rtl8366.o rtl8366rb.o 12 + obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o 13 + realtek-smi-objs := realtek-smi-core.o rtl8366.o rtl8366rb.o 14 14 obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o 15 15 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o 16 16 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
+1 -1
drivers/net/dsa/realtek-smi.c drivers/net/dsa/realtek-smi-core.c
··· 40 40 #include <linux/bitops.h> 41 41 #include <linux/if_bridge.h> 42 42 43 - #include "realtek-smi.h" 43 + #include "realtek-smi-core.h" 44 44 45 45 #define REALTEK_SMI_ACK_RETRY_COUNT 5 46 46 #define REALTEK_SMI_HW_STOP_DELAY 25 /* msecs */
drivers/net/dsa/realtek-smi.h drivers/net/dsa/realtek-smi-core.h
+1 -1
drivers/net/dsa/rtl8366.c
··· 11 11 #include <linux/if_bridge.h> 12 12 #include <net/dsa.h> 13 13 14 - #include "realtek-smi.h" 14 + #include "realtek-smi-core.h" 15 15 16 16 int rtl8366_mc_is_used(struct realtek_smi *smi, int mc_index, int *used) 17 17 {
+1 -1
drivers/net/dsa/rtl8366rb.c
··· 20 20 #include <linux/of_irq.h> 21 21 #include <linux/regmap.h> 22 22 23 - #include "realtek-smi.h" 23 + #include "realtek-smi-core.h" 24 24 25 25 #define RTL8366RB_PORT_NUM_CPU 5 26 26 #define RTL8366RB_NUM_PORTS 6