[alsa-devel] [PATCH v2 2/4] ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Nov 17 02:13:00 CET 2016


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

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 at renesas.com>
Acked-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.com>
---
v1 -> v2

 - title, commit message were updated

 sound/soc/codecs/Kconfig  | 1 +
 sound/soc/codecs/wm9081.c | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 764be36a..f6a710a 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1060,6 +1060,7 @@ config SND_SOC_WM8998
 
 config SND_SOC_WM9081
 	tristate
+	depends on I2C
 
 config SND_SOC_WM9090
 	tristate
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 856867e..6febef3 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1304,7 +1304,6 @@ static int wm9081_probe(struct snd_soc_codec *codec)
 	.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 int wm9081_i2c_remove(struct i2c_client *client)
 	.remove =   wm9081_i2c_remove,
 	.id_table = wm9081_i2c_id,
 };
-#endif
 
 module_i2c_driver(wm9081_i2c_driver);
 
-- 
1.9.1



More information about the Alsa-devel mailing list