[alsa-devel] [PATCH v2 0/4] ASoC: Convert to module_i2c/spi_driver()
Hi Mark
These are v2 of "ASoC: Convert to module_i2c/spi_driver()" patch series. Mainly, it updated Subject and commit comment, and doesn't have I2C/SPI side patches. It includes I2C side only.
Kuninori Morimoto (4): ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C) ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C) ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C) ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
sound/soc/codecs/Kconfig | 2 ++ sound/soc/codecs/uda1380.c | 22 +--------------------- sound/soc/codecs/wm8523.c | 24 +----------------------- sound/soc/codecs/wm8580.c | 25 +------------------------ sound/soc/codecs/wm9081.c | 2 -- 5 files changed, 5 insertions(+), 70 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
uda1380 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
And, this patch adds "depends on I2C" to Kconfig
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- title, commit message were updated
sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/uda1380.c | 22 +--------------------- 2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 50d2deb..764be36a 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -874,6 +874,7 @@ config SND_SOC_UDA134X
config SND_SOC_UDA1380 tristate + depends on I2C
config SND_SOC_WL1273 tristate diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 533e3bb..8e52439 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -775,7 +775,6 @@ static int uda1380_remove(struct snd_soc_codec *codec) }, };
-#if IS_ENABLED(CONFIG_I2C) static int uda1380_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -815,27 +814,8 @@ static int uda1380_i2c_remove(struct i2c_client *i2c) .remove = uda1380_i2c_remove, .id_table = uda1380_i2c_id, }; -#endif
-static int __init uda1380_modinit(void) -{ - int ret = 0; -#if IS_ENABLED(CONFIG_I2C) - ret = i2c_add_driver(&uda1380_i2c_driver); - if (ret != 0) - pr_err("Failed to register UDA1380 I2C driver: %d\n", ret); -#endif - return ret; -} -module_init(uda1380_modinit); - -static void __exit uda1380_exit(void) -{ -#if IS_ENABLED(CONFIG_I2C) - i2c_del_driver(&uda1380_i2c_driver); -#endif -} -module_exit(uda1380_exit); +module_i2c_driver(uda1380_i2c_driver);
MODULE_AUTHOR("Giorgio Padrin"); MODULE_DESCRIPTION("Audio support for codec Philips UDA1380");
From: Kuninori Morimoto kuninori.morimoto.gx@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@renesas.com Acked-by: Charles Keepax ckeepax@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);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- title, commit message were updated
sound/soc/codecs/wm8580.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index faa7287..243451f 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -932,7 +932,6 @@ static int wm8580_remove(struct snd_soc_codec *codec) .volatile_reg = wm8580_volatile, };
-#if IS_ENABLED(CONFIG_I2C) static int wm8580_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -987,30 +986,8 @@ static int wm8580_i2c_remove(struct i2c_client *client) .remove = wm8580_i2c_remove, .id_table = wm8580_i2c_id, }; -#endif
-static int __init wm8580_modinit(void) -{ - int ret = 0; - -#if IS_ENABLED(CONFIG_I2C) - ret = i2c_add_driver(&wm8580_i2c_driver); - if (ret != 0) { - pr_err("Failed to register WM8580 I2C driver: %d\n", ret); - } -#endif - - return ret; -} -module_init(wm8580_modinit); - -static void __exit wm8580_exit(void) -{ -#if IS_ENABLED(CONFIG_I2C) - i2c_del_driver(&wm8580_i2c_driver); -#endif -} -module_exit(wm8580_exit); +module_i2c_driver(wm8580_i2c_driver);
MODULE_DESCRIPTION("ASoC WM8580 driver"); MODULE_AUTHOR("Mark Brown broonie@opensource.wolfsonmicro.com");
On Thu, Nov 17, 2016 at 01:13:18AM +0000, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
On Thu, Nov 17, 2016 at 01:13:18AM +0000, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
This doesn't apply against current code, please check and resend.
Hi Mark
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
This doesn't apply against current code, please check and resend.
How about -C1 option ? it works for me. If not, I can send v3 patch, please let me know
git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
Best regards --- Kuninori Morimoto
On Tue, Nov 22, 2016 at 02:03:25AM +0000, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
This doesn't apply against current code, please check and resend.
How about -C1 option ? it works for me. If not, I can send v3 patch, please let me know
git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
So, I happened to still have the patch sitting there in my apply folder and that worked but in future please do resend things as I've usually deleted the mail from my inbox when I say that.
Hi Mark
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
This doesn't apply against current code, please check and resend.
How about -C1 option ? it works for me. If not, I can send v3 patch, please let me know
git am -C1 0003-ASoC-wm8580-Remove-if-IS_ENABLED-CONFIG_I2C.patch
So, I happened to still have the patch sitting there in my apply folder and that worked but in future please do resend things as I've usually deleted the mail from my inbox when I say that.
OK, I see. Sorry for my fault
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8523 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- title, commit message were updated
sound/soc/codecs/wm8523.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index deb2e07..6d0a272 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -446,7 +446,6 @@ static int wm8523_probe(struct snd_soc_codec *codec) .volatile_reg = wm8523_volatile_register, };
-#if IS_ENABLED(CONFIG_I2C) static int wm8523_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -543,29 +542,8 @@ static int wm8523_i2c_remove(struct i2c_client *client) .remove = wm8523_i2c_remove, .id_table = wm8523_i2c_id, }; -#endif
-static int __init wm8523_modinit(void) -{ - int ret; -#if IS_ENABLED(CONFIG_I2C) - ret = i2c_add_driver(&wm8523_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register WM8523 I2C driver: %d\n", - ret); - } -#endif - return 0; -} -module_init(wm8523_modinit); - -static void __exit wm8523_exit(void) -{ -#if IS_ENABLED(CONFIG_I2C) - i2c_del_driver(&wm8523_i2c_driver); -#endif -} -module_exit(wm8523_exit); +module_i2c_driver(wm8523_i2c_driver);
MODULE_DESCRIPTION("ASoC WM8523 driver"); MODULE_AUTHOR("Mark Brown broonie@opensource.wolfsonmicro.com");
On Thu, Nov 17, 2016 at 01:13:35AM +0000, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
wm8523 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
participants (3)
-
Charles Keepax
-
Kuninori Morimoto
-
Mark Brown