[1/2] regmap: Add eplicit dependencies to catch "select" misuse
diff mbox

Message ID 1408270138-29811-1-git-send-email-geert@linux-m68k.org
State New, archived
Headers show

Commit Message

Geert Uytterhoeven Aug. 17, 2014, 10:08 a.m. UTC
Add explicit dependencies for the various regmap modules, so Kconfig
will print a warning message when another module selects a regmap module
without fulfilling its dependencies.

Without this, it's much more difficult to find out which module did the
offending select.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/base/regmap/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

Comments

Wolfram Sang Aug. 17, 2014, 12:31 p.m. UTC | #1
On Sun, Aug 17, 2014 at 12:08:57PM +0200, Geert Uytterhoeven wrote:
> Add explicit dependencies for the various regmap modules, so Kconfig
> will print a warning message when another module selects a regmap module
> without fulfilling its dependencies.
> 
> Without this, it's much more difficult to find out which module did the
> offending select.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Acked-by: Wolfram Sang <wsa@the-dreams.de>
Mark Brown Aug. 17, 2014, 1:54 p.m. UTC | #2
On Sun, Aug 17, 2014 at 12:08:57PM +0200, Geert Uytterhoeven wrote:
> Add explicit dependencies for the various regmap modules, so Kconfig
> will print a warning message when another module selects a regmap module
> without fulfilling its dependencies.

Applied, thanks.  The second patch is a bug fix independent of this one.

Patch
diff mbox

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 4251570610c9..8a3f51f7b1b9 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -11,12 +11,15 @@  config REGMAP
 
 config REGMAP_I2C
 	tristate
+	depends on I2C
 
 config REGMAP_SPI
 	tristate
+	depends on SPI
 
 config REGMAP_SPMI
 	tristate
+	depends on SPMI
 
 config REGMAP_MMIO
 	tristate