Skip to contentSkip to conversation

net: phy: mdio-sun4i: don't select REGULATOR

PATCH Applied Beniamino Galvani 2 participants 2 messages Sep 5, 2014 – Sep 7, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: mdio-sun4i: don't select REGULATOR

The mdio-sun4i driver automatically selects REGULATOR and REGULATOR_FIXED_VOLTAGE because it uses the regulator API. But a driver selecting a subsystem increases the chance of generating circular Kconfig dependencies, especially when other drivers depend on the selected symbol.

Since the regulator API functions are replaced with no-ops when REGULATOR is disabled, the driver can be built successfully even without regulator support and so those 'select' dependencies can be safely dropped.

---
 drivers/net/phy/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/net/phy/Kconfig +0 -2
index 28437ab..14afa4f 100644
@@ -159,8 +159,6 @@ config MDIO_OCTEON
 config MDIO_SUN4I
 	tristate "Allwinner sun4i MDIO interface support"
 	depends on ARCH_SUNXI
-	select REGULATOR
-	select REGULATOR_FIXED_VOLTAGE
 	help
 	  This driver supports the MDIO interface found in the network
 	  interface units of the Allwinner SoC that have an EMAC (A10,
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: Beniamino Galvani <[email protected]>
Date: Sat, 6 Sep 2014 00:28:23 +0200

Quoted 6 lines

The mdio-sun4i driver automatically selects REGULATOR and REGULATOR_FIXED_VOLTAGE because it uses the regulator API. But a driver selecting a subsystem increases the chance of generating circular Kconfig dependencies, especially when other drivers depend on the selected symbol.

Quoted 7 lines

Since the regulator API functions are replaced with no-ops when REGULATOR is disabled, the driver can be built successfully even without regulator support and so those 'select' dependencies can be safely dropped.

Applied to net-next, thanks.