* [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver()
@ 2016-11-15 5:08 Kuninori Morimoto
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
` (18 more replies)
0 siblings, 19 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:08 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
Hi Mark
These patches uses module_i2c/spi_driver() on each driver
to cleanup driver entries.
I confirmed compile test only.
1) - 4): remove #ifdef CONFIG_I2C, add depends on CONFIG_I2C, and uses module_i2c_driver
5) - 19): uses module_i2c/spi_driver() and removed module_init/exit()
Kuninori Morimoto (19):
1) ASoC: uda1380: Convert to module_i2c_driver()
2) ASoC: wm9081: Convert to module_i2c_driver()
3) ASoC: wm8580: Convert to module_i2c_driver()
4) ASoC: wm8523: Convert to module_i2c_driver()
5) ASoC: wm8510: Convert to module_i2c/spi_driver()
6) ASoC: wm8995: Convert to module_i2c/spi_driver()
7) ASoC: wm8988: Convert to module_i2c/spi_driver()
8) ASoC: wm8985: Convert to module_i2c/spi_driver()
9) ASoC: wm8983: Convert to module_i2c/spi_driver()
10) ASoC: wm8900: Convert to module_i2c/spi_driver()
11) ASoC: wm8776: Convert to module_i2c/spi_driver()
12) ASoC: wm8753: Convert to module_i2c/spi_driver()
13) ASoC: wm8750: Convert to module_i2c/spi_driver()
14) ASoC: wm8741: Convert to module_i2c/spi_driver()
15) ASoC: wm8731: Convert to module_i2c/spi_driver()
16) ASoC: wm8737: Convert to module_i2c/spi_driver()
17) ASoC: wm8728: Convert to module_i2c/spi_driver()
18) ASoC: wm8711: Convert to module_i2c/spi_driver()
19) ASoC: da7210: Convert to module_i2c/spi_driver()
sound/soc/codecs/Kconfig | 2 ++
sound/soc/codecs/da7210.c | 30 ++----------------------------
sound/soc/codecs/uda1380.c | 22 +---------------------
sound/soc/codecs/wm8510.c | 34 ++--------------------------------
sound/soc/codecs/wm8523.c | 24 +-----------------------
sound/soc/codecs/wm8580.c | 25 +------------------------
sound/soc/codecs/wm8711.c | 34 ++--------------------------------
sound/soc/codecs/wm8728.c | 34 ++--------------------------------
sound/soc/codecs/wm8731.c | 34 ++--------------------------------
sound/soc/codecs/wm8737.c | 34 ++--------------------------------
sound/soc/codecs/wm8741.c | 34 ++--------------------------------
sound/soc/codecs/wm8750.c | 34 ++--------------------------------
sound/soc/codecs/wm8753.c | 34 ++--------------------------------
sound/soc/codecs/wm8776.c | 34 ++--------------------------------
sound/soc/codecs/wm8900.c | 34 ++--------------------------------
sound/soc/codecs/wm8983.c | 35 ++---------------------------------
sound/soc/codecs/wm8985.c | 35 ++---------------------------------
sound/soc/codecs/wm8988.c | 35 ++---------------------------------
sound/soc/codecs/wm8995.c | 37 ++-----------------------------------
sound/soc/codecs/wm9081.c | 2 --
20 files changed, 35 insertions(+), 552 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
@ 2016-11-15 5:09 ` Kuninori Morimoto
2016-11-15 6:21 ` Takashi Iwai
2016-11-21 19:20 ` Applied "ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
` (17 subsequent siblings)
18 siblings, 2 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:09 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
uda1380 driver doesn't work without CONFIG_I2C anyway.
Let's depend on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
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 f1c48d2..2e7eb36 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");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-15 5:09 ` Kuninori Morimoto
2016-11-16 9:38 ` [alsa-devel] " Charles Keepax
` (2 more replies)
2016-11-15 5:09 ` [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver() Kuninori Morimoto
` (16 subsequent siblings)
18 siblings, 3 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:09 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm9081 driver doesn't work without CONFIG_I2C anyway.
Let's depend on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
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 2e7eb36..dc4a876 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1049,6 +1049,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
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-15 5:09 ` Kuninori Morimoto
2016-11-16 9:41 ` Charles Keepax
2016-11-15 5:10 ` [PATCH 04/19] ASoC: wm8523: " Kuninori Morimoto
` (15 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:09 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm8580 driver doesn't work without CONFIG_I2C anyway.
Let's depend on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
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>");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 04/19] ASoC: wm8523: Convert to module_i2c_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (2 preceding siblings ...)
2016-11-15 5:09 ` [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-15 5:10 ` Kuninori Morimoto
2016-11-16 9:42 ` Charles Keepax
2016-11-21 19:20 ` Applied "ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (14 subsequent siblings)
18 siblings, 2 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
wm8523 driver doesn't work without CONFIG_I2C anyway.
Let's depend on it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
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>");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (3 preceding siblings ...)
2016-11-15 5:10 ` [PATCH 04/19] ASoC: wm8523: " Kuninori Morimoto
@ 2016-11-15 5:10 ` Kuninori Morimoto
2016-11-15 8:33 ` Lars-Peter Clausen
` (2 more replies)
2016-11-15 5:10 ` [PATCH 06/19] ASoC: wm8995: " Kuninori Morimoto
` (13 subsequent siblings)
18 siblings, 3 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8510.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 119ceac..2455606 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -651,6 +651,7 @@ static int wm8510_spi_remove(struct spi_device *spi)
.probe = wm8510_spi_probe,
.remove = wm8510_spi_remove,
};
+module_spi_driver(wm8510_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -698,40 +699,9 @@ static int wm8510_i2c_remove(struct i2c_client *client)
.remove = wm8510_i2c_remove,
.id_table = wm8510_i2c_id,
};
+module_i2c_driver(wm8510_i2c_driver);
#endif
-static int __init wm8510_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8510_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8510 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8510_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8510 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8510_modinit);
-
-static void __exit wm8510_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8510_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8510_spi_driver);
-#endif
-}
-module_exit(wm8510_exit);
-
MODULE_DESCRIPTION("ASoC WM8510 driver");
MODULE_AUTHOR("Liam Girdwood");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 06/19] ASoC: wm8995: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (4 preceding siblings ...)
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
@ 2016-11-15 5:10 ` Kuninori Morimoto
2016-11-15 18:05 ` kbuild test robot
2016-11-15 5:11 ` [PATCH 07/19] ASoC: wm8988: " Kuninori Morimoto
` (12 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8995.c | 37 ++-----------------------------------
1 file changed, 2 insertions(+), 35 deletions(-)
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 19b08a5..c6d56b8 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -2252,6 +2252,7 @@ static int wm8995_spi_remove(struct spi_device *spi)
.probe = wm8995_spi_probe,
.remove = wm8995_spi_remove
};
+module_spi_driver(wm8995_spi_driver);
#endif
#if IS_ENABLED(CONFIG_I2C)
@@ -2304,43 +2305,9 @@ static int wm8995_i2c_remove(struct i2c_client *client)
.remove = wm8995_i2c_remove,
.id_table = wm8995_i2c_id
};
+module_i2c_driver(wm8995_i2c_driver);
#endif
-static int __init wm8995_modinit(void)
-{
- int ret = 0;
-
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8995_i2c_driver);
- if (ret) {
- printk(KERN_ERR "Failed to register wm8995 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8995_spi_driver);
- if (ret) {
- printk(KERN_ERR "Failed to register wm8995 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-
-module_init(wm8995_modinit);
-
-static void __exit wm8995_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8995_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8995_spi_driver);
-#endif
-}
-
-module_exit(wm8995_exit);
-
MODULE_DESCRIPTION("ASoC WM8995 driver");
MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 07/19] ASoC: wm8988: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (5 preceding siblings ...)
2016-11-15 5:10 ` [PATCH 06/19] ASoC: wm8995: " Kuninori Morimoto
@ 2016-11-15 5:11 ` Kuninori Morimoto
2016-11-15 5:11 ` [PATCH 08/19] ASoC: wm8985: " Kuninori Morimoto
` (11 subsequent siblings)
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:11 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8988.c | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index b0d0219..ad0b35d 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -877,6 +877,7 @@ static int wm8988_spi_remove(struct spi_device *spi)
.probe = wm8988_spi_probe,
.remove = wm8988_spi_remove,
};
+module_spi_driver(wm8988_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -925,41 +926,9 @@ static int wm8988_i2c_remove(struct i2c_client *client)
.remove = wm8988_i2c_remove,
.id_table = wm8988_i2c_id,
};
+module_i2c_driver(wm8988_i2c_driver);
#endif
-static int __init wm8988_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8988_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8988 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8988_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8988 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8988_modinit);
-
-static void __exit wm8988_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8988_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8988_spi_driver);
-#endif
-}
-module_exit(wm8988_exit);
-
-
MODULE_DESCRIPTION("ASoC WM8988 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 08/19] ASoC: wm8985: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (6 preceding siblings ...)
2016-11-15 5:11 ` [PATCH 07/19] ASoC: wm8988: " Kuninori Morimoto
@ 2016-11-15 5:11 ` Kuninori Morimoto
2016-11-15 17:40 ` kbuild test robot
2016-11-15 5:11 ` [PATCH 09/19] ASoC: wm8983: " Kuninori Morimoto
` (10 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:11 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8985.c | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 05344f9..34eb3cb 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -1172,6 +1172,7 @@ static int wm8985_spi_remove(struct spi_device *spi)
.probe = wm8985_spi_probe,
.remove = wm8985_spi_remove
};
+module_spi_driver(wm8985_spi_driver);
#endif
#if IS_ENABLED(CONFIG_I2C)
@@ -1223,41 +1224,9 @@ static int wm8985_i2c_remove(struct i2c_client *i2c)
.remove = wm8985_i2c_remove,
.id_table = wm8985_i2c_id
};
+module_i2c_driver(wm8985_i2c_driver);
#endif
-static int __init wm8985_modinit(void)
-{
- int ret = 0;
-
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8985_i2c_driver);
- if (ret) {
- printk(KERN_ERR "Failed to register wm8985 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8985_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8985 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8985_modinit);
-
-static void __exit wm8985_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8985_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8985_spi_driver);
-#endif
-}
-module_exit(wm8985_exit);
-
MODULE_DESCRIPTION("ASoC WM8985 / WM8758 driver");
MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 09/19] ASoC: wm8983: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (7 preceding siblings ...)
2016-11-15 5:11 ` [PATCH 08/19] ASoC: wm8985: " Kuninori Morimoto
@ 2016-11-15 5:11 ` Kuninori Morimoto
2016-11-15 5:12 ` [PATCH 10/19] ASoC: wm8900: " Kuninori Morimoto
` (9 subsequent siblings)
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:11 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8983.c | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index bfdbe72..023d0b4 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -1039,6 +1039,7 @@ static int wm8983_spi_remove(struct spi_device *spi)
.probe = wm8983_spi_probe,
.remove = wm8983_spi_remove
};
+module_spi_driver(wm8983_spi_driver);
#endif
#if IS_ENABLED(CONFIG_I2C)
@@ -1087,41 +1088,9 @@ static int wm8983_i2c_remove(struct i2c_client *client)
.remove = wm8983_i2c_remove,
.id_table = wm8983_i2c_id
};
+module_i2c_driver(wm8983_i2c_driver);
#endif
-static int __init wm8983_modinit(void)
-{
- int ret = 0;
-
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8983_i2c_driver);
- if (ret) {
- printk(KERN_ERR "Failed to register wm8983 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8983_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8983 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8983_modinit);
-
-static void __exit wm8983_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8983_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8983_spi_driver);
-#endif
-}
-module_exit(wm8983_exit);
-
MODULE_DESCRIPTION("ASoC WM8983 driver");
MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 10/19] ASoC: wm8900: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (8 preceding siblings ...)
2016-11-15 5:11 ` [PATCH 09/19] ASoC: wm8983: " Kuninori Morimoto
@ 2016-11-15 5:12 ` Kuninori Morimoto
2016-11-15 5:12 ` [PATCH 11/19] ASoC: wm8776: " Kuninori Morimoto
` (8 subsequent siblings)
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:12 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8900.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index c77b49a..80cf426 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -1272,6 +1272,7 @@ static int wm8900_spi_remove(struct spi_device *spi)
.probe = wm8900_spi_probe,
.remove = wm8900_spi_remove,
};
+module_spi_driver(wm8900_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -1318,40 +1319,9 @@ static int wm8900_i2c_remove(struct i2c_client *client)
.remove = wm8900_i2c_remove,
.id_table = wm8900_i2c_id,
};
+module_i2c_driver(wm8900_i2c_driver);
#endif
-static int __init wm8900_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8900_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8900 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8900_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8900 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8900_modinit);
-
-static void __exit wm8900_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8900_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8900_spi_driver);
-#endif
-}
-module_exit(wm8900_exit);
-
MODULE_DESCRIPTION("ASoC WM8900 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 11/19] ASoC: wm8776: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (9 preceding siblings ...)
2016-11-15 5:12 ` [PATCH 10/19] ASoC: wm8900: " Kuninori Morimoto
@ 2016-11-15 5:12 ` Kuninori Morimoto
2016-11-15 17:51 ` kbuild test robot
2016-11-15 5:12 ` [PATCH 12/19] ASoC: wm8753: " Kuninori Morimoto
` (7 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:12 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8776.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index ae30480..617c81d 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -495,6 +495,7 @@ static int wm8776_spi_remove(struct spi_device *spi)
.probe = wm8776_spi_probe,
.remove = wm8776_spi_remove,
};
+module_spi_driver(wm8776_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -543,40 +544,9 @@ static int wm8776_i2c_remove(struct i2c_client *client)
.remove = wm8776_i2c_remove,
.id_table = wm8776_i2c_id,
};
+module_i2c_driver(wm8776_i2c_driver);
#endif
-static int __init wm8776_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8776_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8776 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8776_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8776 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8776_modinit);
-
-static void __exit wm8776_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8776_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8776_spi_driver);
-#endif
-}
-module_exit(wm8776_exit);
-
MODULE_DESCRIPTION("ASoC WM8776 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 12/19] ASoC: wm8753: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (10 preceding siblings ...)
2016-11-15 5:12 ` [PATCH 11/19] ASoC: wm8776: " Kuninori Morimoto
@ 2016-11-15 5:12 ` Kuninori Morimoto
2016-11-15 17:35 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 13/19] ASoC: wm8750: " Kuninori Morimoto
` (6 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:12 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8753.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 9bdf544..9eb8eb4c 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1555,6 +1555,7 @@ static int wm8753_spi_remove(struct spi_device *spi)
.probe = wm8753_spi_probe,
.remove = wm8753_spi_remove,
};
+module_spi_driver(wm8753_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -1608,40 +1609,9 @@ static int wm8753_i2c_remove(struct i2c_client *client)
.remove = wm8753_i2c_remove,
.id_table = wm8753_i2c_id,
};
+module_i2c_driver(wm8753_i2c_driver);
#endif
-static int __init wm8753_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8753_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8753 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8753_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8753 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8753_modinit);
-
-static void __exit wm8753_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8753_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8753_spi_driver);
-#endif
-}
-module_exit(wm8753_exit);
-
MODULE_DESCRIPTION("ASoC WM8753 driver");
MODULE_AUTHOR("Liam Girdwood");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 13/19] ASoC: wm8750: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (11 preceding siblings ...)
2016-11-15 5:12 ` [PATCH 12/19] ASoC: wm8753: " Kuninori Morimoto
@ 2016-11-15 5:13 ` Kuninori Morimoto
2016-11-15 5:13 ` [PATCH 14/19] ASoC: wm8741: " Kuninori Morimoto
` (5 subsequent siblings)
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:13 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8750.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 0da2bba..244f6a4 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -785,6 +785,7 @@ static int wm8750_spi_remove(struct spi_device *spi)
.probe = wm8750_spi_probe,
.remove = wm8750_spi_remove,
};
+module_spi_driver(wm8750_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -833,40 +834,9 @@ static int wm8750_i2c_remove(struct i2c_client *client)
.remove = wm8750_i2c_remove,
.id_table = wm8750_i2c_id,
};
+module_i2c_driver(wm8750_i2c_driver);
#endif
-static int __init wm8750_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8750_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8750 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8750_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8750 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8750_modinit);
-
-static void __exit wm8750_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8750_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8750_spi_driver);
-#endif
-}
-module_exit(wm8750_exit);
-
MODULE_DESCRIPTION("ASoC WM8750 driver");
MODULE_AUTHOR("Liam Girdwood");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 14/19] ASoC: wm8741: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (12 preceding siblings ...)
2016-11-15 5:13 ` [PATCH 13/19] ASoC: wm8750: " Kuninori Morimoto
@ 2016-11-15 5:13 ` Kuninori Morimoto
2016-11-15 17:51 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 15/19] ASoC: wm8731: " Kuninori Morimoto
` (4 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:13 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8741.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 565d477..9621f94 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -607,6 +607,7 @@ static int wm8741_i2c_remove(struct i2c_client *client)
.remove = wm8741_i2c_remove,
.id_table = wm8741_i2c_id,
};
+module_i2c_driver(wm8741_i2c_driver);
#endif
#if defined(CONFIG_SPI_MASTER)
@@ -664,40 +665,9 @@ static int wm8741_spi_remove(struct spi_device *spi)
.probe = wm8741_spi_probe,
.remove = wm8741_spi_remove,
};
+module_spi_driver(wm8741_spi_driver);
#endif /* CONFIG_SPI_MASTER */
-static int __init wm8741_modinit(void)
-{
- int ret = 0;
-
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8741_i2c_driver);
- if (ret != 0)
- pr_err("Failed to register WM8741 I2C driver: %d\n", ret);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8741_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8741 SPI driver: %d\n",
- ret);
- }
-#endif
-
- return ret;
-}
-module_init(wm8741_modinit);
-
-static void __exit wm8741_exit(void)
-{
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8741_spi_driver);
-#endif
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8741_i2c_driver);
-#endif
-}
-module_exit(wm8741_exit);
-
MODULE_DESCRIPTION("ASoC WM8741 driver");
MODULE_AUTHOR("Ian Lartey <ian@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 15/19] ASoC: wm8731: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (13 preceding siblings ...)
2016-11-15 5:13 ` [PATCH 14/19] ASoC: wm8741: " Kuninori Morimoto
@ 2016-11-15 5:13 ` Kuninori Morimoto
2016-11-15 18:07 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 16/19] ASoC: wm8737: " Kuninori Morimoto
` (3 subsequent siblings)
18 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:13 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8731.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 4f9a1eb..c5cf2a5 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -728,6 +728,7 @@ static int wm8731_spi_remove(struct spi_device *spi)
.probe = wm8731_spi_probe,
.remove = wm8731_spi_remove,
};
+module_spi_driver(wm8731_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -806,40 +807,9 @@ static int wm8731_i2c_remove(struct i2c_client *client)
.remove = wm8731_i2c_remove,
.id_table = wm8731_i2c_id,
};
+module_i2c_driver(wm8731_i2c_driver);
#endif
-static int __init wm8731_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8731_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8731 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8731_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8731 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8731_modinit);
-
-static void __exit wm8731_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8731_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8731_spi_driver);
-#endif
-}
-module_exit(wm8731_exit);
-
MODULE_DESCRIPTION("ASoC WM8731 driver");
MODULE_AUTHOR("Richard Purdie");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 16/19] ASoC: wm8737: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (14 preceding siblings ...)
2016-11-15 5:13 ` [PATCH 15/19] ASoC: wm8731: " Kuninori Morimoto
@ 2016-11-15 5:13 ` Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 17/19] ASoC: wm8728: " Kuninori Morimoto
` (2 subsequent siblings)
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:13 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8737.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index f0cb1c4..60d0917 100644
--- a/sound/soc/codecs/wm8737.c
+++ b/sound/soc/codecs/wm8737.c
@@ -664,6 +664,7 @@ static int wm8737_i2c_remove(struct i2c_client *client)
.remove = wm8737_i2c_remove,
.id_table = wm8737_i2c_id,
};
+module_i2c_driver(wm8737_i2c_driver);
#endif
#if defined(CONFIG_SPI_MASTER)
@@ -714,40 +715,9 @@ static int wm8737_spi_remove(struct spi_device *spi)
.probe = wm8737_spi_probe,
.remove = wm8737_spi_remove,
};
+module_spi_driver(wm8737_spi_driver);
#endif /* CONFIG_SPI_MASTER */
-static int __init wm8737_modinit(void)
-{
- int ret;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8737_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8737_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8737 SPI driver: %d\n",
- ret);
- }
-#endif
- return 0;
-}
-module_init(wm8737_modinit);
-
-static void __exit wm8737_exit(void)
-{
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8737_spi_driver);
-#endif
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8737_i2c_driver);
-#endif
-}
-module_exit(wm8737_exit);
-
MODULE_DESCRIPTION("ASoC WM8737 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 17/19] ASoC: wm8728: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (15 preceding siblings ...)
2016-11-15 5:13 ` [PATCH 16/19] ASoC: wm8737: " Kuninori Morimoto
@ 2016-11-15 5:14 ` Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 18/19] ASoC: wm8711: " Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 19/19] ASoC: da7210: " Kuninori Morimoto
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:14 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8728.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 797cc6e..6e9b9a6 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -279,6 +279,7 @@ static int wm8728_spi_remove(struct spi_device *spi)
.probe = wm8728_spi_probe,
.remove = wm8728_spi_remove,
};
+module_spi_driver(wm8728_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -326,40 +327,9 @@ static int wm8728_i2c_remove(struct i2c_client *client)
.remove = wm8728_i2c_remove,
.id_table = wm8728_i2c_id,
};
+module_i2c_driver(wm8728_i2c_driver);
#endif
-static int __init wm8728_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8728_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8728 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8728_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register wm8728 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(wm8728_modinit);
-
-static void __exit wm8728_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8728_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8728_spi_driver);
-#endif
-}
-module_exit(wm8728_exit);
-
MODULE_DESCRIPTION("ASoC WM8728 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 18/19] ASoC: wm8711: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (16 preceding siblings ...)
2016-11-15 5:14 ` [PATCH 17/19] ASoC: wm8728: " Kuninori Morimoto
@ 2016-11-15 5:14 ` Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 19/19] ASoC: da7210: " Kuninori Morimoto
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:14 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/wm8711.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 2b376c9..edcc45d 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -438,6 +438,7 @@ static int wm8711_spi_remove(struct spi_device *spi)
.probe = wm8711_spi_probe,
.remove = wm8711_spi_remove,
};
+module_spi_driver(wm8711_spi_driver);
#endif /* CONFIG_SPI_MASTER */
#if IS_ENABLED(CONFIG_I2C)
@@ -485,40 +486,9 @@ static int wm8711_i2c_remove(struct i2c_client *client)
.remove = wm8711_i2c_remove,
.id_table = wm8711_i2c_id,
};
+module_i2c_driver(wm8711_i2c_driver);
#endif
-static int __init wm8711_modinit(void)
-{
- int ret;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&wm8711_i2c_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8711 I2C driver: %d\n",
- ret);
- }
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&wm8711_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register WM8711 SPI driver: %d\n",
- ret);
- }
-#endif
- return 0;
-}
-module_init(wm8711_modinit);
-
-static void __exit wm8711_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&wm8711_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&wm8711_spi_driver);
-#endif
-}
-module_exit(wm8711_exit);
-
MODULE_DESCRIPTION("ASoC WM8711 driver");
MODULE_AUTHOR("Mike Arthur");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 19/19] ASoC: da7210: Convert to module_i2c/spi_driver()
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
` (17 preceding siblings ...)
2016-11-15 5:14 ` [PATCH 18/19] ASoC: wm8711: " Kuninori Morimoto
@ 2016-11-15 5:14 ` Kuninori Morimoto
18 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 5:14 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Let's use module_i2c/spi_driver()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/codecs/da7210.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 17053df..308df3f 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1261,6 +1261,7 @@ static int da7210_i2c_remove(struct i2c_client *client)
.remove = da7210_i2c_remove,
.id_table = da7210_i2c_id,
};
+module_i2c_driver(da7210_i2c_driver);
#endif
#if defined(CONFIG_SPI_MASTER)
@@ -1344,36 +1345,9 @@ static int da7210_spi_remove(struct spi_device *spi)
.probe = da7210_spi_probe,
.remove = da7210_spi_remove
};
+module_spi_driver(da7210_spi_driver);
#endif
-static int __init da7210_modinit(void)
-{
- int ret = 0;
-#if IS_ENABLED(CONFIG_I2C)
- ret = i2c_add_driver(&da7210_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- ret = spi_register_driver(&da7210_spi_driver);
- if (ret) {
- printk(KERN_ERR "Failed to register da7210 SPI driver: %d\n",
- ret);
- }
-#endif
- return ret;
-}
-module_init(da7210_modinit);
-
-static void __exit da7210_exit(void)
-{
-#if IS_ENABLED(CONFIG_I2C)
- i2c_del_driver(&da7210_i2c_driver);
-#endif
-#if defined(CONFIG_SPI_MASTER)
- spi_unregister_driver(&da7210_spi_driver);
-#endif
-}
-module_exit(da7210_exit);
-
MODULE_DESCRIPTION("ASoC DA7210 driver");
MODULE_AUTHOR("David Chen, Kuninori Morimoto");
MODULE_LICENSE("GPL");
--
1.9.1
^ permalink raw reply related [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-15 6:21 ` Takashi Iwai
2016-11-15 6:42 ` Kuninori Morimoto
2016-11-21 19:20 ` Applied "ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
1 sibling, 1 reply; 48+ messages in thread
From: Takashi Iwai @ 2016-11-15 6:21 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, 15 Nov 2016 06:09:19 +0100,
Kuninori Morimoto wrote:
>
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> uda1380 driver doesn't work without CONFIG_I2C anyway.
> Let's depend on it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> 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 f1c48d2..2e7eb36 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
Note that this doesn't help when it's reverse-selected by others.
The same is true for an item with a prompt, but the item like this
without prompt is supposed to be reverse-selected only, so adding
"depends on" there is merely a placeholder.
That being said, currently the only way to guarantee the dependency by
a reverse-selection is to put the depends-on to the selecting item,
not to the selected item.
It's a generic problem of the kbuild implementation, and people know
of it over a decade. It was discussed in the previous Plumbers
conference, and developers agreed to improve the situation, so it may
be a bit better in near future.
thanks,
Takashi
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 6:21 ` Takashi Iwai
@ 2016-11-15 6:42 ` Kuninori Morimoto
2016-11-15 7:30 ` Takashi Iwai
2016-11-15 12:08 ` Lars-Peter Clausen
0 siblings, 2 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 6:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Linux-ALSA, Mark Brown, Simon
HI Takashi-san
> > config SND_SOC_UDA1380
> > tristate
> > + depends on I2C
>
> Note that this doesn't help when it's reverse-selected by others.
>
> The same is true for an item with a prompt, but the item like this
> without prompt is supposed to be reverse-selected only, so adding
> "depends on" there is merely a placeholder.
>
> That being said, currently the only way to guarantee the dependency by
> a reverse-selection is to put the depends-on to the selecting item,
> not to the selected item.
>
> It's a generic problem of the kbuild implementation, and people know
> of it over a decade. It was discussed in the previous Plumbers
> conference, and developers agreed to improve the situation, so it may
> be a bit better in near future.
Hmm.. indeed thanks for your feedback.
So, should I send v2 patch ? or as-is is OK at this point ?
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 6:42 ` Kuninori Morimoto
@ 2016-11-15 7:30 ` Takashi Iwai
2016-11-15 12:08 ` Lars-Peter Clausen
1 sibling, 0 replies; 48+ messages in thread
From: Takashi Iwai @ 2016-11-15 7:30 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, 15 Nov 2016 07:42:08 +0100,
Kuninori Morimoto wrote:
>
>
> HI Takashi-san
>
> > > config SND_SOC_UDA1380
> > > tristate
> > > + depends on I2C
> >
> > Note that this doesn't help when it's reverse-selected by others.
> >
> > The same is true for an item with a prompt, but the item like this
> > without prompt is supposed to be reverse-selected only, so adding
> > "depends on" there is merely a placeholder.
> >
> > That being said, currently the only way to guarantee the dependency by
> > a reverse-selection is to put the depends-on to the selecting item,
> > not to the selected item.
> >
> > It's a generic problem of the kbuild implementation, and people know
> > of it over a decade. It was discussed in the previous Plumbers
> > conference, and developers agreed to improve the situation, so it may
> > be a bit better in near future.
>
> Hmm.. indeed thanks for your feedback.
> So, should I send v2 patch ? or as-is is OK at this point ?
I leave the decision to Mark, as he'll gather patches, after all :)
We may add more comments either in the code or in the changelog, too.
Takashi
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
@ 2016-11-15 8:33 ` Lars-Peter Clausen
2016-11-15 8:49 ` Kuninori Morimoto
2016-11-15 17:21 ` kbuild test robot
2016-11-16 9:44 ` Charles Keepax
2 siblings, 1 reply; 48+ messages in thread
From: Lars-Peter Clausen @ 2016-11-15 8:33 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA, Simon
On 11/15/2016 06:10 AM, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Let's use module_i2c/spi_driver()
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> sound/soc/codecs/wm8510.c | 34 ++--------------------------------
> 1 file changed, 2 insertions(+), 32 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
> index 119ceac..2455606 100644
> --- a/sound/soc/codecs/wm8510.c
> +++ b/sound/soc/codecs/wm8510.c
> @@ -651,6 +651,7 @@ static int wm8510_spi_remove(struct spi_device *spi)
> .probe = wm8510_spi_probe,
> .remove = wm8510_spi_remove,
> };
> +module_spi_driver(wm8510_spi_driver);
> #endif /* CONFIG_SPI_MASTER */
>
> #if IS_ENABLED(CONFIG_I2C)
> @@ -698,40 +699,9 @@ static int wm8510_i2c_remove(struct i2c_client *client)
> .remove = wm8510_i2c_remove,
> .id_table = wm8510_i2c_id,
> };
> +module_i2c_driver(wm8510_i2c_driver);
> #endif
This wont work when the driver is built as a module as this creates multiple
module init and exit entry points.
Ideally the driver would be split into submodules for i2c and spi, like
we've already done for a few drivers.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-15 8:33 ` Lars-Peter Clausen
@ 2016-11-15 8:49 ` Kuninori Morimoto
0 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-15 8:49 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Linux-ALSA, Mark Brown, Simon
Hi Lars-Peter, Mark
Thank you for your feedback
> > diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
> > index 119ceac..2455606 100644
> > --- a/sound/soc/codecs/wm8510.c
> > +++ b/sound/soc/codecs/wm8510.c
> > @@ -651,6 +651,7 @@ static int wm8510_spi_remove(struct spi_device *spi)
> > .probe = wm8510_spi_probe,
> > .remove = wm8510_spi_remove,
> > };
> > +module_spi_driver(wm8510_spi_driver);
> > #endif /* CONFIG_SPI_MASTER */
> >
> > #if IS_ENABLED(CONFIG_I2C)
> > @@ -698,40 +699,9 @@ static int wm8510_i2c_remove(struct i2c_client *client)
> > .remove = wm8510_i2c_remove,
> > .id_table = wm8510_i2c_id,
> > };
> > +module_i2c_driver(wm8510_i2c_driver);
> > #endif
>
>
> This wont work when the driver is built as a module as this creates multiple
> module init and exit entry points.
>
> Ideally the driver would be split into submodules for i2c and spi, like
> we've already done for a few drivers.
Mark.
I can do it, but what is your opinion ?
Do nothing for i2c/spi driver, or use Lars-Peter's idea ?
If former, just ignore i2c/spi driver patches.
If later, I will send v2 patch.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 6:42 ` Kuninori Morimoto
2016-11-15 7:30 ` Takashi Iwai
@ 2016-11-15 12:08 ` Lars-Peter Clausen
2016-11-16 18:01 ` Mark Brown
1 sibling, 1 reply; 48+ messages in thread
From: Lars-Peter Clausen @ 2016-11-15 12:08 UTC (permalink / raw)
To: Kuninori Morimoto, Takashi Iwai; +Cc: Linux-ALSA, Mark Brown, Simon
On 11/15/2016 07:42 AM, Kuninori Morimoto wrote:
>
> HI Takashi-san
>
>>> config SND_SOC_UDA1380
>>> tristate
>>> + depends on I2C
>>
>> Note that this doesn't help when it's reverse-selected by others.
>>
>> The same is true for an item with a prompt, but the item like this
>> without prompt is supposed to be reverse-selected only, so adding
>> "depends on" there is merely a placeholder.
>>
>> That being said, currently the only way to guarantee the dependency by
>> a reverse-selection is to put the depends-on to the selecting item,
>> not to the selected item.
>>
>> It's a generic problem of the kbuild implementation, and people know
>> of it over a decade. It was discussed in the previous Plumbers
>> conference, and developers agreed to improve the situation, so it may
>> be a bit better in near future.
>
> Hmm.. indeed thanks for your feedback.
> So, should I send v2 patch ? or as-is is OK at this point ?
While it doesn't prevent the symbol from being selected this will generate a
warning if the symbol is selected while its dependencies are not met. So I'd
say it is still useful to have.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 8:33 ` Lars-Peter Clausen
@ 2016-11-15 17:21 ` kbuild test robot
2016-11-16 9:44 ` Charles Keepax
2 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 17:21 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7157 bytes --]
Hi Kuninori,
[auto build test ERROR on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8510.c:13:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:702:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8510_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:654:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8510_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:702:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8510_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:654:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8510_spi_driver);
^~~~~~~~~~~~~~~~~
>> include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:702:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8510_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:654:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8510_spi_driver);
^~~~~~~~~~~~~~~~~
>> include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:702:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8510_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8510.c:654:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8510_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +702 sound/soc/codecs/wm8510.c
648 .name = "wm8510",
649 .of_match_table = wm8510_of_match,
650 },
651 .probe = wm8510_spi_probe,
652 .remove = wm8510_spi_remove,
653 };
> 654 module_spi_driver(wm8510_spi_driver);
655 #endif /* CONFIG_SPI_MASTER */
656
657 #if IS_ENABLED(CONFIG_I2C)
658 static int wm8510_i2c_probe(struct i2c_client *i2c,
659 const struct i2c_device_id *id)
660 {
661 struct wm8510_priv *wm8510;
662 int ret;
663
664 wm8510 = devm_kzalloc(&i2c->dev, sizeof(struct wm8510_priv),
665 GFP_KERNEL);
666 if (wm8510 == NULL)
667 return -ENOMEM;
668
669 wm8510->regmap = devm_regmap_init_i2c(i2c, &wm8510_regmap);
670 if (IS_ERR(wm8510->regmap))
671 return PTR_ERR(wm8510->regmap);
672
673 i2c_set_clientdata(i2c, wm8510);
674
675 ret = snd_soc_register_codec(&i2c->dev,
676 &soc_codec_dev_wm8510, &wm8510_dai, 1);
677
678 return ret;
679 }
680
681 static int wm8510_i2c_remove(struct i2c_client *client)
682 {
683 snd_soc_unregister_codec(&client->dev);
684 return 0;
685 }
686
687 static const struct i2c_device_id wm8510_i2c_id[] = {
688 { "wm8510", 0 },
689 { }
690 };
691 MODULE_DEVICE_TABLE(i2c, wm8510_i2c_id);
692
693 static struct i2c_driver wm8510_i2c_driver = {
694 .driver = {
695 .name = "wm8510",
696 .of_match_table = wm8510_of_match,
697 },
698 .probe = wm8510_i2c_probe,
699 .remove = wm8510_i2c_remove,
700 .id_table = wm8510_i2c_id,
701 };
> 702 module_i2c_driver(wm8510_i2c_driver);
703 #endif
704
705 MODULE_DESCRIPTION("ASoC WM8510 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29570 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 12/19] ASoC: wm8753: Convert to module_i2c/spi_driver()
2016-11-15 5:12 ` [PATCH 12/19] ASoC: wm8753: " Kuninori Morimoto
@ 2016-11-15 17:35 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 17:35 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7394 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8753.c:34:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1612:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8753_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1558:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8753_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1612:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8753_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1558:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8753_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1612:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8753_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1558:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8753_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1612:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8753_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8753.c:1558:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8753_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +1612 sound/soc/codecs/wm8753.c
1552 .name = "wm8753",
1553 .of_match_table = wm8753_of_match,
1554 },
1555 .probe = wm8753_spi_probe,
1556 .remove = wm8753_spi_remove,
1557 };
> 1558 module_spi_driver(wm8753_spi_driver);
1559 #endif /* CONFIG_SPI_MASTER */
1560
1561 #if IS_ENABLED(CONFIG_I2C)
1562 static int wm8753_i2c_probe(struct i2c_client *i2c,
1563 const struct i2c_device_id *id)
1564 {
1565 struct wm8753_priv *wm8753;
1566 int ret;
1567
1568 wm8753 = devm_kzalloc(&i2c->dev, sizeof(struct wm8753_priv),
1569 GFP_KERNEL);
1570 if (wm8753 == NULL)
1571 return -ENOMEM;
1572
1573 i2c_set_clientdata(i2c, wm8753);
1574
1575 wm8753->regmap = devm_regmap_init_i2c(i2c, &wm8753_regmap);
1576 if (IS_ERR(wm8753->regmap)) {
1577 ret = PTR_ERR(wm8753->regmap);
1578 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
1579 ret);
1580 return ret;
1581 }
1582
1583 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm8753,
1584 wm8753_dai, ARRAY_SIZE(wm8753_dai));
1585 if (ret != 0)
1586 dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
1587
1588 return ret;
1589 }
1590
1591 static int wm8753_i2c_remove(struct i2c_client *client)
1592 {
1593 snd_soc_unregister_codec(&client->dev);
1594 return 0;
1595 }
1596
1597 static const struct i2c_device_id wm8753_i2c_id[] = {
1598 { "wm8753", 0 },
1599 { }
1600 };
1601 MODULE_DEVICE_TABLE(i2c, wm8753_i2c_id);
1602
1603 static struct i2c_driver wm8753_i2c_driver = {
1604 .driver = {
1605 .name = "wm8753",
1606 .of_match_table = wm8753_of_match,
1607 },
1608 .probe = wm8753_i2c_probe,
1609 .remove = wm8753_i2c_remove,
1610 .id_table = wm8753_i2c_id,
1611 };
> 1612 module_i2c_driver(wm8753_i2c_driver);
1613 #endif
1614
1615 MODULE_DESCRIPTION("ASoC WM8753 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29570 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 08/19] ASoC: wm8985: Convert to module_i2c/spi_driver()
2016-11-15 5:11 ` [PATCH 08/19] ASoC: wm8985: " Kuninori Morimoto
@ 2016-11-15 17:40 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 17:40 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7230 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8985.c:19:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1227:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8985_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1175:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8985_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1227:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8985_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1175:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8985_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1227:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8985_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1175:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8985_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1227:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8985_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8985.c:1175:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8985_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +1227 sound/soc/codecs/wm8985.c
1169 .driver = {
1170 .name = "wm8985",
1171 },
1172 .probe = wm8985_spi_probe,
1173 .remove = wm8985_spi_remove
1174 };
> 1175 module_spi_driver(wm8985_spi_driver);
1176 #endif
1177
1178 #if IS_ENABLED(CONFIG_I2C)
1179 static int wm8985_i2c_probe(struct i2c_client *i2c,
1180 const struct i2c_device_id *id)
1181 {
1182 struct wm8985_priv *wm8985;
1183 int ret;
1184
1185 wm8985 = devm_kzalloc(&i2c->dev, sizeof *wm8985, GFP_KERNEL);
1186 if (!wm8985)
1187 return -ENOMEM;
1188
1189 i2c_set_clientdata(i2c, wm8985);
1190
1191 wm8985->dev_type = id->driver_data;
1192
1193 wm8985->regmap = devm_regmap_init_i2c(i2c, &wm8985_regmap);
1194 if (IS_ERR(wm8985->regmap)) {
1195 ret = PTR_ERR(wm8985->regmap);
1196 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
1197 ret);
1198 return ret;
1199 }
1200
1201 ret = snd_soc_register_codec(&i2c->dev,
1202 &soc_codec_dev_wm8985, &wm8985_dai, 1);
1203 return ret;
1204 }
1205
1206 static int wm8985_i2c_remove(struct i2c_client *i2c)
1207 {
1208 snd_soc_unregister_codec(&i2c->dev);
1209 return 0;
1210 }
1211
1212 static const struct i2c_device_id wm8985_i2c_id[] = {
1213 { "wm8985", WM8985 },
1214 { "wm8758", WM8758 },
1215 { }
1216 };
1217 MODULE_DEVICE_TABLE(i2c, wm8985_i2c_id);
1218
1219 static struct i2c_driver wm8985_i2c_driver = {
1220 .driver = {
1221 .name = "wm8985",
1222 },
1223 .probe = wm8985_i2c_probe,
1224 .remove = wm8985_i2c_remove,
1225 .id_table = wm8985_i2c_id
1226 };
> 1227 module_i2c_driver(wm8985_i2c_driver);
1228 #endif
1229
1230 MODULE_DESCRIPTION("ASoC WM8985 / WM8758 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29570 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 11/19] ASoC: wm8776: Convert to module_i2c/spi_driver()
2016-11-15 5:12 ` [PATCH 11/19] ASoC: wm8776: " Kuninori Morimoto
@ 2016-11-15 17:51 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 17:51 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7212 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: x86_64-randconfig-x014-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8776.c:15:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:547:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8776_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:498:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8776_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:547:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8776_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:498:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8776_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:547:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8776_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:498:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8776_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:547:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8776_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8776.c:498:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8776_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +547 sound/soc/codecs/wm8776.c
492 .name = "wm8776",
493 .of_match_table = wm8776_of_match,
494 },
495 .probe = wm8776_spi_probe,
496 .remove = wm8776_spi_remove,
497 };
> 498 module_spi_driver(wm8776_spi_driver);
499 #endif /* CONFIG_SPI_MASTER */
500
501 #if IS_ENABLED(CONFIG_I2C)
502 static int wm8776_i2c_probe(struct i2c_client *i2c,
503 const struct i2c_device_id *id)
504 {
505 struct wm8776_priv *wm8776;
506 int ret;
507
508 wm8776 = devm_kzalloc(&i2c->dev, sizeof(struct wm8776_priv),
509 GFP_KERNEL);
510 if (wm8776 == NULL)
511 return -ENOMEM;
512
513 wm8776->regmap = devm_regmap_init_i2c(i2c, &wm8776_regmap);
514 if (IS_ERR(wm8776->regmap))
515 return PTR_ERR(wm8776->regmap);
516
517 i2c_set_clientdata(i2c, wm8776);
518
519 ret = snd_soc_register_codec(&i2c->dev,
520 &soc_codec_dev_wm8776, wm8776_dai, ARRAY_SIZE(wm8776_dai));
521
522 return ret;
523 }
524
525 static int wm8776_i2c_remove(struct i2c_client *client)
526 {
527 snd_soc_unregister_codec(&client->dev);
528 return 0;
529 }
530
531 static const struct i2c_device_id wm8776_i2c_id[] = {
532 { "wm8775", WM8775 },
533 { "wm8776", WM8776 },
534 { }
535 };
536 MODULE_DEVICE_TABLE(i2c, wm8776_i2c_id);
537
538 static struct i2c_driver wm8776_i2c_driver = {
539 .driver = {
540 .name = "wm8776",
541 .of_match_table = wm8776_of_match,
542 },
543 .probe = wm8776_i2c_probe,
544 .remove = wm8776_i2c_remove,
545 .id_table = wm8776_i2c_id,
546 };
> 547 module_i2c_driver(wm8776_i2c_driver);
548 #endif
549
550 MODULE_DESCRIPTION("ASoC WM8776 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25588 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 14/19] ASoC: wm8741: Convert to module_i2c/spi_driver()
2016-11-15 5:13 ` [PATCH 14/19] ASoC: wm8741: " Kuninori Morimoto
@ 2016-11-15 17:51 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 17:51 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7555 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8741.c:14:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:668:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8741_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:610:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8741_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:668:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8741_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:610:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8741_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:668:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8741_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:610:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8741_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:668:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8741_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8741.c:610:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8741_i2c_driver);
^~~~~~~~~~~~~~~~~
vim +/module_spi_driver +668 sound/soc/codecs/wm8741.c
604 .of_match_table = wm8741_of_match,
605 },
606 .probe = wm8741_i2c_probe,
607 .remove = wm8741_i2c_remove,
608 .id_table = wm8741_i2c_id,
609 };
> 610 module_i2c_driver(wm8741_i2c_driver);
611 #endif
612
613 #if defined(CONFIG_SPI_MASTER)
614 static int wm8741_spi_probe(struct spi_device *spi)
615 {
616 struct wm8741_priv *wm8741;
617 int ret, i;
618
619 wm8741 = devm_kzalloc(&spi->dev, sizeof(struct wm8741_priv),
620 GFP_KERNEL);
621 if (wm8741 == NULL)
622 return -ENOMEM;
623
624 for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++)
625 wm8741->supplies[i].supply = wm8741_supply_names[i];
626
627 ret = devm_regulator_bulk_get(&spi->dev, ARRAY_SIZE(wm8741->supplies),
628 wm8741->supplies);
629 if (ret != 0) {
630 dev_err(&spi->dev, "Failed to request supplies: %d\n", ret);
631 return ret;
632 }
633
634 wm8741->regmap = devm_regmap_init_spi(spi, &wm8741_regmap);
635 if (IS_ERR(wm8741->regmap)) {
636 ret = PTR_ERR(wm8741->regmap);
637 dev_err(&spi->dev, "Failed to init regmap: %d\n", ret);
638 return ret;
639 }
640
641 ret = wm8741_set_pdata(&spi->dev, wm8741);
642 if (ret != 0) {
643 dev_err(&spi->dev, "Failed to set pdata: %d\n", ret);
644 return ret;
645 }
646
647 spi_set_drvdata(spi, wm8741);
648
649 ret = snd_soc_register_codec(&spi->dev,
650 &soc_codec_dev_wm8741, &wm8741_dai, 1);
651 return ret;
652 }
653
654 static int wm8741_spi_remove(struct spi_device *spi)
655 {
656 snd_soc_unregister_codec(&spi->dev);
657 return 0;
658 }
659
660 static struct spi_driver wm8741_spi_driver = {
661 .driver = {
662 .name = "wm8741",
663 .of_match_table = wm8741_of_match,
664 },
665 .probe = wm8741_spi_probe,
666 .remove = wm8741_spi_remove,
667 };
> 668 module_spi_driver(wm8741_spi_driver);
669 #endif /* CONFIG_SPI_MASTER */
670
671 MODULE_DESCRIPTION("ASoC WM8741 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29570 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 06/19] ASoC: wm8995: Convert to module_i2c/spi_driver()
2016-11-15 5:10 ` [PATCH 06/19] ASoC: wm8995: " Kuninori Morimoto
@ 2016-11-15 18:05 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 18:05 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 7425 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8995.c:15:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8995_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8995_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8995_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8995_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8995_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8995_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2308:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8995_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8995.c:2255:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8995_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +2308 sound/soc/codecs/wm8995.c
2249 .driver = {
2250 .name = "wm8995",
2251 },
2252 .probe = wm8995_spi_probe,
2253 .remove = wm8995_spi_remove
2254 };
> 2255 module_spi_driver(wm8995_spi_driver);
2256 #endif
2257
2258 #if IS_ENABLED(CONFIG_I2C)
2259 static int wm8995_i2c_probe(struct i2c_client *i2c,
2260 const struct i2c_device_id *id)
2261 {
2262 struct wm8995_priv *wm8995;
2263 int ret;
2264
2265 wm8995 = devm_kzalloc(&i2c->dev, sizeof(*wm8995), GFP_KERNEL);
2266 if (!wm8995)
2267 return -ENOMEM;
2268
2269 i2c_set_clientdata(i2c, wm8995);
2270
2271 wm8995->regmap = devm_regmap_init_i2c(i2c, &wm8995_regmap);
2272 if (IS_ERR(wm8995->regmap)) {
2273 ret = PTR_ERR(wm8995->regmap);
2274 dev_err(&i2c->dev, "Failed to register regmap: %d\n", ret);
2275 return ret;
2276 }
2277
2278 ret = snd_soc_register_codec(&i2c->dev,
2279 &soc_codec_dev_wm8995, wm8995_dai,
2280 ARRAY_SIZE(wm8995_dai));
2281 if (ret < 0)
2282 dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
2283
2284 return ret;
2285 }
2286
2287 static int wm8995_i2c_remove(struct i2c_client *client)
2288 {
2289 snd_soc_unregister_codec(&client->dev);
2290 return 0;
2291 }
2292
2293 static const struct i2c_device_id wm8995_i2c_id[] = {
2294 {"wm8995", 0},
2295 {}
2296 };
2297
2298 MODULE_DEVICE_TABLE(i2c, wm8995_i2c_id);
2299
2300 static struct i2c_driver wm8995_i2c_driver = {
2301 .driver = {
2302 .name = "wm8995",
2303 },
2304 .probe = wm8995_i2c_probe,
2305 .remove = wm8995_i2c_remove,
2306 .id_table = wm8995_i2c_id
2307 };
> 2308 module_i2c_driver(wm8995_i2c_driver);
2309 #endif
2310
2311 MODULE_DESCRIPTION("ASoC WM8995 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43233 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 15/19] ASoC: wm8731: Convert to module_i2c/spi_driver()
2016-11-15 5:13 ` [PATCH 15/19] ASoC: wm8731: " Kuninori Morimoto
@ 2016-11-15 18:07 ` kbuild test robot
0 siblings, 0 replies; 48+ messages in thread
From: kbuild test robot @ 2016-11-15 18:07 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, kbuild-all, Simon
[-- Attachment #1: Type: text/plain, Size: 8034 bytes --]
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8731.c:16:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +810 sound/soc/codecs/wm8731.c
725 .name = "wm8731",
726 .of_match_table = wm8731_of_match,
727 },
728 .probe = wm8731_spi_probe,
729 .remove = wm8731_spi_remove,
730 };
> 731 module_spi_driver(wm8731_spi_driver);
732 #endif /* CONFIG_SPI_MASTER */
733
734 #if IS_ENABLED(CONFIG_I2C)
735 static int wm8731_i2c_probe(struct i2c_client *i2c,
736 const struct i2c_device_id *id)
737 {
738 struct wm8731_priv *wm8731;
739 int ret;
740
741 wm8731 = devm_kzalloc(&i2c->dev, sizeof(struct wm8731_priv),
742 GFP_KERNEL);
743 if (wm8731 == NULL)
744 return -ENOMEM;
745
746 wm8731->mclk = devm_clk_get(&i2c->dev, "mclk");
747 if (IS_ERR(wm8731->mclk)) {
748 ret = PTR_ERR(wm8731->mclk);
749 if (ret == -ENOENT) {
750 wm8731->mclk = NULL;
751 dev_warn(&i2c->dev, "Assuming static MCLK\n");
752 } else {
753 dev_err(&i2c->dev, "Failed to get MCLK: %d\n",
754 ret);
755 return ret;
756 }
757 }
758
759 mutex_init(&wm8731->lock);
760
761 i2c_set_clientdata(i2c, wm8731);
762
763 ret = wm8731_request_supplies(&i2c->dev, wm8731);
764 if (ret != 0)
765 return ret;
766
767 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap);
768 if (IS_ERR(wm8731->regmap)) {
769 ret = PTR_ERR(wm8731->regmap);
770 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
771 ret);
772 return ret;
773 }
774
775 ret = wm8731_hw_init(&i2c->dev, wm8731);
776 if (ret != 0)
777 return ret;
778
779 ret = snd_soc_register_codec(&i2c->dev,
780 &soc_codec_dev_wm8731, &wm8731_dai, 1);
781 if (ret != 0) {
782 dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
783 return ret;
784 }
785
786 return 0;
787 }
788
789 static int wm8731_i2c_remove(struct i2c_client *client)
790 {
791 snd_soc_unregister_codec(&client->dev);
792 return 0;
793 }
794
795 static const struct i2c_device_id wm8731_i2c_id[] = {
796 { "wm8731", 0 },
797 { }
798 };
799 MODULE_DEVICE_TABLE(i2c, wm8731_i2c_id);
800
801 static struct i2c_driver wm8731_i2c_driver = {
802 .driver = {
803 .name = "wm8731",
804 .of_match_table = wm8731_of_match,
805 },
806 .probe = wm8731_i2c_probe,
807 .remove = wm8731_i2c_remove,
808 .id_table = wm8731_i2c_id,
809 };
> 810 module_i2c_driver(wm8731_i2c_driver);
811 #endif
812
813 MODULE_DESCRIPTION("ASoC WM8731 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29570 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [alsa-devel] [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver()
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-16 9:38 ` Charles Keepax
2016-11-16 9:39 ` Charles Keepax
2016-11-21 19:20 ` Applied "ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2 siblings, 0 replies; 48+ messages in thread
From: Charles Keepax @ 2016-11-16 9:38 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, Nov 15, 2016 at 05:09:39AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm9081 driver doesn't work without CONFIG_I2C anyway.
> Let's depend on it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Would be nice to CC patches@opensource.wolfsonmicro.com on these,
but otherwise:
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver()
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-16 9:38 ` [alsa-devel] " Charles Keepax
@ 2016-11-16 9:39 ` Charles Keepax
2016-11-17 0:43 ` Kuninori Morimoto
2016-11-21 19:20 ` Applied "ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2 siblings, 1 reply; 48+ messages in thread
From: Charles Keepax @ 2016-11-16 9:39 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, Nov 15, 2016 at 05:09:39AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm9081 driver doesn't work without CONFIG_I2C anyway.
> Let's depend on it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Ah just notice the commit message doesn't make sense, the title
says convert to module_i2c_driver but that isn't what the patch
does at all.
Thanks,
Charles
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver()
2016-11-15 5:09 ` [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver() Kuninori Morimoto
@ 2016-11-16 9:41 ` Charles Keepax
2016-11-17 0:10 ` Kuninori Morimoto
0 siblings, 1 reply; 48+ messages in thread
From: Charles Keepax @ 2016-11-16 9:41 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, Nov 15, 2016 at 05:09:57AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm8580 driver doesn't work without CONFIG_I2C anyway.
> Let's depend on it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> 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);
Again here the patch looks fine but commit message is a bit
different from the patch, this converts the driver to use
module_i2c_driver as the title of the commit message states but
the body of the commit message seems to imply we are adding a
dependency into the Kconfig which we arn't doing.
Thanks,
Charles
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 04/19] ASoC: wm8523: Convert to module_i2c_driver()
2016-11-15 5:10 ` [PATCH 04/19] ASoC: wm8523: " Kuninori Morimoto
@ 2016-11-16 9:42 ` Charles Keepax
2016-11-21 19:20 ` Applied "ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
1 sibling, 0 replies; 48+ messages in thread
From: Charles Keepax @ 2016-11-16 9:42 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, Nov 15, 2016 at 05:10:15AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> wm8523 driver doesn't work without CONFIG_I2C anyway.
> Let's depend on it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Again patch looks fine commit message probably needs work.
Thanks,
Charles
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 8:33 ` Lars-Peter Clausen
2016-11-15 17:21 ` kbuild test robot
@ 2016-11-16 9:44 ` Charles Keepax
2016-11-17 0:16 ` Kuninori Morimoto
2 siblings, 1 reply; 48+ messages in thread
From: Charles Keepax @ 2016-11-16 9:44 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Tue, Nov 15, 2016 at 05:10:33AM +0000, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Let's use module_i2c/spi_driver()
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Yeah I think from here on in the series these have the I2C/SPI
issues Lars mentions.
Thanks,
Charles
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-15 12:08 ` Lars-Peter Clausen
@ 2016-11-16 18:01 ` Mark Brown
2016-11-17 0:18 ` Kuninori Morimoto
0 siblings, 1 reply; 48+ messages in thread
From: Mark Brown @ 2016-11-16 18:01 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Takashi Iwai, Linux-ALSA, Simon, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 535 bytes --]
On Tue, Nov 15, 2016 at 01:08:45PM +0100, Lars-Peter Clausen wrote:
> On 11/15/2016 07:42 AM, Kuninori Morimoto wrote:
> > Hmm.. indeed thanks for your feedback.
> > So, should I send v2 patch ? or as-is is OK at this point ?
In general if there's lots of discussion on a series it's worth sending
new versions once that's addressed.
> While it doesn't prevent the symbol from being selected this will generate a
> warning if the symbol is selected while its dependencies are not met. So I'd
> say it is still useful to have.
Yes.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver()
2016-11-16 9:41 ` Charles Keepax
@ 2016-11-17 0:10 ` Kuninori Morimoto
0 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 0:10 UTC (permalink / raw)
To: Charles Keepax; +Cc: Linux-ALSA, Mark Brown, Simon
Hi Charles
Thank you for your feedback
> On Tue, Nov 15, 2016 at 05:09:57AM +0000, Kuninori Morimoto wrote:
> >
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > wm8580 driver doesn't work without CONFIG_I2C anyway.
> > Let's depend on it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> Again here the patch looks fine but commit message is a bit
> different from the patch, this converts the driver to use
> module_i2c_driver as the title of the commit message states but
> the body of the commit message seems to imply we are adding a
> dependency into the Kconfig which we arn't doing.
And about Kconfig, WM8510 already has "depends on I2C" in Kconfig,
so, this patch doesn't have such lines.
But yes indeed, commit message is not good, I will fix it in v2, thanks.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-16 9:44 ` Charles Keepax
@ 2016-11-17 0:16 ` Kuninori Morimoto
2016-11-17 9:33 ` Charles Keepax
0 siblings, 1 reply; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 0:16 UTC (permalink / raw)
To: Charles Keepax; +Cc: Linux-ALSA, Mark Brown, Simon
Hi Charles
Thank you for your feedback
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Let's use module_i2c/spi_driver()
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
>
> Yeah I think from here on in the series these have the I2C/SPI
> issues Lars mentions.
I can create xx-i2c.c xx-spi.c as Lars mentioned.
Do you think it is nice ? or do nothing for these drivers is nice ?
If it is "nice to have", I can try it, please let me know.
I will fixup I2C side patches only, and post these as v2 patch.
I will post I2C/SPI patches if these were "nice to have"
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver()
2016-11-16 18:01 ` Mark Brown
@ 2016-11-17 0:18 ` Kuninori Morimoto
0 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 0:18 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, Linux-ALSA, Lars-Peter Clausen, Simon
Hi Mark
> > > Hmm.. indeed thanks for your feedback.
> > > So, should I send v2 patch ? or as-is is OK at this point ?
>
> In general if there's lots of discussion on a series it's worth sending
> new versions once that's addressed.
OK, thanks.
But, I will post v2 which solved commit message as Charles's review.
v2 includes I2C side patches only
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver()
2016-11-16 9:39 ` Charles Keepax
@ 2016-11-17 0:43 ` Kuninori Morimoto
0 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 0:43 UTC (permalink / raw)
To: Charles Keepax; +Cc: Linux-ALSA, Mark Brown, Simon
Hi Charles
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > wm9081 driver doesn't work without CONFIG_I2C anyway.
> > Let's depend on it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
>
> Ah just notice the commit message doesn't make sense, the title
> says convert to module_i2c_driver but that isn't what the patch
> does at all.
In wm9081 case, it already has module_i2c_driver(), but has #ifdef.
I used same commit message for all series, but yes, confusable.
will fixup in v2
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-17 0:16 ` Kuninori Morimoto
@ 2016-11-17 9:33 ` Charles Keepax
2016-11-17 9:51 ` Kuninori Morimoto
0 siblings, 1 reply; 48+ messages in thread
From: Charles Keepax @ 2016-11-17 9:33 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
On Thu, Nov 17, 2016 at 12:16:06AM +0000, Kuninori Morimoto wrote:
>
> Hi Charles
>
> Thank you for your feedback
>
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > >
> > > Let's use module_i2c/spi_driver()
> > >
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > ---
> >
> > Yeah I think from here on in the series these have the I2C/SPI
> > issues Lars mentions.
>
> I can create xx-i2c.c xx-spi.c as Lars mentioned.
> Do you think it is nice ? or do nothing for these drivers is nice ?
> If it is "nice to have", I can try it, please let me know.
>
> I will fixup I2C side patches only, and post these as v2 patch.
> I will post I2C/SPI patches if these were "nice to have"
Creating the seperate I2C/SPI files would indeed be the best way
to go, however, personally I would be inclined to leave them
alone. They are mostly legacy parts, I won't have hardware to
test almost all of them and there is no pressing need to update
them at this time.
Thanks,
Charles
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver()
2016-11-17 9:33 ` Charles Keepax
@ 2016-11-17 9:51 ` Kuninori Morimoto
0 siblings, 0 replies; 48+ messages in thread
From: Kuninori Morimoto @ 2016-11-17 9:51 UTC (permalink / raw)
To: Charles Keepax; +Cc: Linux-ALSA, Mark Brown, Simon
Hi Charles
Thank you for your feedback
> > I will fixup I2C side patches only, and post these as v2 patch.
> > I will post I2C/SPI patches if these were "nice to have"
>
> Creating the seperate I2C/SPI files would indeed be the best way
> to go, however, personally I would be inclined to leave them
> alone. They are mostly legacy parts, I won't have hardware to
> test almost all of them and there is no pressing need to update
> them at this time.
OK, no problem.
So, let's keep it as-is now :)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Applied "ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree
2016-11-15 5:10 ` [PATCH 04/19] ASoC: wm8523: " Kuninori Morimoto
2016-11-16 9:42 ` Charles Keepax
@ 2016-11-21 19:20 ` Mark Brown
1 sibling, 0 replies; 48+ messages in thread
From: Mark Brown @ 2016-11-21 19:20 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Charles Keepax, Mark Brown, Linux-ALSA, Simon
The patch
ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From f196e9ac07ed1212ce7d106c07a25019c9c1ee18 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 17 Nov 2016 01:13:35 +0000
Subject: [PATCH] ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
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 deb2e075428e..6d0a2723bfde 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -446,7 +446,6 @@ static const struct regmap_config wm8523_regmap = {
.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 struct i2c_driver wm8523_i2c_driver = {
.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>");
--
2.10.2
^ permalink raw reply related [flat|nested] 48+ messages in thread
* Applied "ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-16 9:38 ` [alsa-devel] " Charles Keepax
2016-11-16 9:39 ` Charles Keepax
@ 2016-11-21 19:20 ` Mark Brown
2 siblings, 0 replies; 48+ messages in thread
From: Mark Brown @ 2016-11-21 19:20 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Charles Keepax, Mark Brown, Linux-ALSA, Simon
The patch
ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From e2d575918bf38d16cacaac789ba05d5e5a649b6f Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 17 Nov 2016 01:13:00 +0000
Subject: [PATCH] ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
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 | 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 c67667bb970f..5efcd9b2152f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1048,6 +1048,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 856867ec2813..6febef337dd2 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -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);
--
2.10.2
^ permalink raw reply related [flat|nested] 48+ messages in thread
* Applied "ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-15 6:21 ` Takashi Iwai
@ 2016-11-21 19:20 ` Mark Brown
1 sibling, 0 replies; 48+ messages in thread
From: Mark Brown @ 2016-11-21 19:20 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Simon
The patch
ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 4a5cf1320a9501261919cf96af300b1df3ad0210 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 17 Nov 2016 01:12:30 +0000
Subject: [PATCH] ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
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 c67667bb970f..98b9a0c35d6b 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 533e3bb444e4..8e52439a58fd 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -775,7 +775,6 @@ static struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
},
};
-#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 struct i2c_driver uda1380_i2c_driver = {
.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");
--
2.10.2
^ permalink raw reply related [flat|nested] 48+ messages in thread
end of thread, other threads:[~2016-11-21 19:20 UTC | newest]
Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 5:08 [PATCH 00/19] ASoC: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 5:09 ` [PATCH 01/19] ASoC: uda1380: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-15 6:21 ` Takashi Iwai
2016-11-15 6:42 ` Kuninori Morimoto
2016-11-15 7:30 ` Takashi Iwai
2016-11-15 12:08 ` Lars-Peter Clausen
2016-11-16 18:01 ` Mark Brown
2016-11-17 0:18 ` Kuninori Morimoto
2016-11-21 19:20 ` Applied "ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2016-11-15 5:09 ` [PATCH 02/19] ASoC: wm9081: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-16 9:38 ` [alsa-devel] " Charles Keepax
2016-11-16 9:39 ` Charles Keepax
2016-11-17 0:43 ` Kuninori Morimoto
2016-11-21 19:20 ` Applied "ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2016-11-15 5:09 ` [PATCH 03/19] ASoC: wm8580: Convert to module_i2c_driver() Kuninori Morimoto
2016-11-16 9:41 ` Charles Keepax
2016-11-17 0:10 ` Kuninori Morimoto
2016-11-15 5:10 ` [PATCH 04/19] ASoC: wm8523: " Kuninori Morimoto
2016-11-16 9:42 ` Charles Keepax
2016-11-21 19:20 ` Applied "ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)" to the asoc tree Mark Brown
2016-11-15 5:10 ` [PATCH 05/19] ASoC: wm8510: Convert to module_i2c/spi_driver() Kuninori Morimoto
2016-11-15 8:33 ` Lars-Peter Clausen
2016-11-15 8:49 ` Kuninori Morimoto
2016-11-15 17:21 ` kbuild test robot
2016-11-16 9:44 ` Charles Keepax
2016-11-17 0:16 ` Kuninori Morimoto
2016-11-17 9:33 ` Charles Keepax
2016-11-17 9:51 ` Kuninori Morimoto
2016-11-15 5:10 ` [PATCH 06/19] ASoC: wm8995: " Kuninori Morimoto
2016-11-15 18:05 ` kbuild test robot
2016-11-15 5:11 ` [PATCH 07/19] ASoC: wm8988: " Kuninori Morimoto
2016-11-15 5:11 ` [PATCH 08/19] ASoC: wm8985: " Kuninori Morimoto
2016-11-15 17:40 ` kbuild test robot
2016-11-15 5:11 ` [PATCH 09/19] ASoC: wm8983: " Kuninori Morimoto
2016-11-15 5:12 ` [PATCH 10/19] ASoC: wm8900: " Kuninori Morimoto
2016-11-15 5:12 ` [PATCH 11/19] ASoC: wm8776: " Kuninori Morimoto
2016-11-15 17:51 ` kbuild test robot
2016-11-15 5:12 ` [PATCH 12/19] ASoC: wm8753: " Kuninori Morimoto
2016-11-15 17:35 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 13/19] ASoC: wm8750: " Kuninori Morimoto
2016-11-15 5:13 ` [PATCH 14/19] ASoC: wm8741: " Kuninori Morimoto
2016-11-15 17:51 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 15/19] ASoC: wm8731: " Kuninori Morimoto
2016-11-15 18:07 ` kbuild test robot
2016-11-15 5:13 ` [PATCH 16/19] ASoC: wm8737: " Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 17/19] ASoC: wm8728: " Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 18/19] ASoC: wm8711: " Kuninori Morimoto
2016-11-15 5:14 ` [PATCH 19/19] ASoC: da7210: " Kuninori Morimoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.