[PATCH net-next] net: dsa: vsc73xx: Fix Kconfig warning and build errors

From: YueHaibing
Date: Mon Jul 08 2019 - 23:04:42 EST


Fix Kconfig dependency warning and subsequent build errors
caused by OF is not set:

WARNING: unmet direct dependencies detected for NET_DSA_VITESSE_VSC73XX
Depends on [n]: NETDEVICES [=y] && HAVE_NET_DSA [=y] && OF [=n] && NET_DSA [=m]
Selected by [m]:
- NET_DSA_VITESSE_VSC73XX_PLATFORM [=m] && NETDEVICES [=y] && HAVE_NET_DSA [=y] && HAS_IOMEM [=y]

Make NET_DSA_VITESSE_VSC73XX_SPI and NET_DSA_VITESSE_VSC73XX_PLATFORM
depends on NET_DSA_VITESSE_VSC73XX to fix this.

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Suggested-by: Andrew Lunn <andrew@xxxxxxx>
Fixes: 95711cd5f0b4 ("net: dsa: vsc73xx: Split vsc73xx driver")
Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
v2: Use "depends on" instead of "select" NET_DSA_VITESSE_VSC73XX
---
drivers/net/dsa/Kconfig | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index cf9dbd1..618853d 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -99,7 +99,7 @@ config NET_DSA_SMSC_LAN9303_MDIO
for MDIO managed mode.

config NET_DSA_VITESSE_VSC73XX
- tristate
+ tristate "Vitesse VSC7385/7388/7395/7398 support"
depends on OF
depends on NET_DSA
select FIXED_PHY
@@ -112,7 +112,7 @@ config NET_DSA_VITESSE_VSC73XX
config NET_DSA_VITESSE_VSC73XX_SPI
tristate "Vitesse VSC7385/7388/7395/7398 SPI mode support"
depends on SPI
- select NET_DSA_VITESSE_VSC73XX
+ depends on NET_DSA_VITESSE_VSC73XX
---help---
This enables support for the Vitesse VSC7385, VSC7388, VSC7395
and VSC7398 SparX integrated ethernet switches in SPI managed mode.
@@ -120,7 +120,7 @@ config NET_DSA_VITESSE_VSC73XX_SPI
config NET_DSA_VITESSE_VSC73XX_PLATFORM
tristate "Vitesse VSC7385/7388/7395/7398 Platform mode support"
depends on HAS_IOMEM
- select NET_DSA_VITESSE_VSC73XX
+ depends on NET_DSA_VITESSE_VSC73XX
---help---
This enables support for the Vitesse VSC7385, VSC7388, VSC7395
and VSC7398 SparX integrated ethernet switches, connected over
--
2.7.4