ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 17 Nov 2016 01:13:00 +0000 (01:13 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 18 Nov 2016 12:07:19 +0000 (12:07 +0000)
wm9081 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C)

And, this patch adds "depends on I2C" to Kconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig
sound/soc/codecs/wm9081.c

index c67667bb970f1729db65b027dd8e963b9ee95b7b..5efcd9b2152ff6e2b3554d91e82b2949ffd4b16e 100644 (file)
@@ -1048,6 +1048,7 @@ config SND_SOC_WM8998
 
 config SND_SOC_WM9081
        tristate
+       depends on I2C
 
 config SND_SOC_WM9090
        tristate
index 856867ec2813486eafb1399b22c2e8e4af5fc474..6febef337dd23c033e67aa6d2d6e22ab2494091d 100644 (file)
@@ -1304,7 +1304,6 @@ static const struct regmap_config wm9081_regmap = {
        .cache_type = REGCACHE_RBTREE,
 };
 
-#if IS_ENABLED(CONFIG_I2C)
 static int wm9081_i2c_probe(struct i2c_client *i2c,
                            const struct i2c_device_id *id)
 {
@@ -1384,7 +1383,6 @@ static struct i2c_driver wm9081_i2c_driver = {
        .remove =   wm9081_i2c_remove,
        .id_table = wm9081_i2c_id,
 };
-#endif
 
 module_i2c_driver(wm9081_i2c_driver);