i2c: Fix Kconfig dependencies
authorJean Delvare <khali@linux-fr.org>
Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)
committerJean Delvare <khali@endymion.delvare>
Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)
drivers/i2c/algos/Kconfig makes all the algorithms dependent on
!I2C_HELPER_AUTO, which triggers a Kconfig warning about broken
dependencies when some driver selects one of the algorithms. Ideally
we would make only the prompts dependent on !I2C_HELPER_AUTO, however
Kconfig doesn't currently support that. So we have to redefine the
symbols separately for the I2C_HELPER_AUTO=y case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michal Marek <mmarek@suse.cz>
drivers/i2c/Kconfig
drivers/i2c/algos/Kconfig

index 30f06e956bfb77e4f183e524657c21dbc211d1fe..b923074b2cbebcef73d91b5b7f23cfd47cb133f1 100644 (file)
@@ -75,7 +75,8 @@ config I2C_HELPER_AUTO
          In doubt, say Y.
 
 config I2C_SMBUS
-       tristate "SMBus-specific protocols" if !I2C_HELPER_AUTO
+       tristate
+       prompt "SMBus-specific protocols" if !I2C_HELPER_AUTO
        help
          Say Y here if you want support for SMBus extensions to the I2C
          specification. At the moment, the only supported extension is
index 7b2ce4a085247fa3f123e9e527b4b0718db0a215..3998dd620a032586970a60f556aa6292318ce84a 100644 (file)
@@ -15,3 +15,15 @@ config I2C_ALGOPCA
        tristate "I2C PCA 9564 interfaces"
 
 endmenu
+
+# In automatic configuration mode, we still have to define the
+# symbols to avoid unmet dependencies.
+
+if I2C_HELPER_AUTO
+config I2C_ALGOBIT
+       tristate
+config I2C_ALGOPCF
+       tristate
+config I2C_ALGOPCA
+       tristate
+endif