All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
@ 2016-08-09  4:52 Kuninori Morimoto
  2016-08-09  4:53 ` [PATCH 001/127] ASoC: use component probe/remove on tas5086 Kuninori Morimoto
                   ` (126 more replies)
  0 siblings, 127 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:52 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


Hi Mark

These are codec duplicate functions cleanup patches - v2
We would like to switch to "component" style base ASoC in the future
instead of current "CPU/Codec/Platform/Card" style.

Current "codec" has its .probe/.remove, and "component" has it too.
codec side is just relayed it to component side.
This is the time to cleanup.

These are very big patch-set, but it doesn't add new features.
[001/127] - [126/127] move callback functions from codec to component,
and last [127/127] will remove codec side .probe/.remove.

We need this kind of cleanup for Platform too.

I build-tested these patches with make allyesconfig on x86,
and tested on Lager board.

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 138+ messages in thread

* [PATCH 001/127] ASoC: use component probe/remove on tas5086
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
@ 2016-08-09  4:53 ` Kuninori Morimoto
  2016-08-09  4:53 ` [PATCH 002/127] ASoC: use component probe/remove on pistachio-internal-dac Kuninori Morimoto
                   ` (125 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:53 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tas5086.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index c297b9f..ad2403d 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -823,8 +823,9 @@ static const struct of_device_id tas5086_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, tas5086_dt_ids);
 #endif
 
-static int tas5086_probe(struct snd_soc_codec *codec)
+static int tas5086_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
 	int i, ret;
 
@@ -872,8 +873,9 @@ exit_disable_regulators:
 	return ret;
 }
 
-static int tas5086_remove(struct snd_soc_codec *codec)
+static void tas5086_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
 
 	if (gpio_is_valid(priv->gpio_nreset))
@@ -881,16 +883,14 @@ static int tas5086_remove(struct snd_soc_codec *codec)
 		gpio_set_value(priv->gpio_nreset, 0);
 
 	regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
-
-	return 0;
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_tas5086 = {
-	.probe			= tas5086_probe,
-	.remove			= tas5086_remove,
 	.suspend		= tas5086_soc_suspend,
 	.resume			= tas5086_soc_resume,
 	.component_driver = {
+		.probe			= tas5086_probe,
+		.remove			= tas5086_remove,
 		.controls		= tas5086_controls,
 		.num_controls		= ARRAY_SIZE(tas5086_controls),
 		.dapm_widgets		= tas5086_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 002/127] ASoC: use component probe/remove on pistachio-internal-dac
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
  2016-08-09  4:53 ` [PATCH 001/127] ASoC: use component probe/remove on tas5086 Kuninori Morimoto
@ 2016-08-09  4:53 ` Kuninori Morimoto
  2016-08-09  4:54 ` [PATCH 003/127] ASoC: use component probe/remove on wm8985 Kuninori Morimoto
                   ` (124 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:53 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood

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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/img/pistachio-internal-dac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/img/pistachio-internal-dac.c b/sound/soc/img/pistachio-internal-dac.c
index 53e11c6..ae26274 100644
--- a/sound/soc/img/pistachio-internal-dac.c
+++ b/sound/soc/img/pistachio-internal-dac.c
@@ -122,8 +122,9 @@ static struct snd_soc_dai_driver pistachio_internal_dac_dais[] = {
 	},
 };
 
-static int pistachio_internal_dac_codec_probe(struct snd_soc_codec *codec)
+static int pistachio_internal_dac_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct pistachio_internal_dac *dac = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_codec_init_regmap(codec, dac->regmap);
@@ -132,9 +133,9 @@ static int pistachio_internal_dac_codec_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver pistachio_internal_dac_driver = {
-	.probe = pistachio_internal_dac_codec_probe,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= pistachio_internal_dac_codec_probe,
 		.controls		= pistachio_internal_dac_snd_controls,
 		.num_controls		= ARRAY_SIZE(pistachio_internal_dac_snd_controls),
 		.dapm_widgets		= pistachio_internal_dac_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 003/127] ASoC: use component probe/remove on wm8985
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
  2016-08-09  4:53 ` [PATCH 001/127] ASoC: use component probe/remove on tas5086 Kuninori Morimoto
  2016-08-09  4:53 ` [PATCH 002/127] ASoC: use component probe/remove on pistachio-internal-dac Kuninori Morimoto
@ 2016-08-09  4:54 ` Kuninori Morimoto
  2016-08-09  4:54 ` [PATCH 004/127] ASoC: use component probe/remove on wm8978 Kuninori Morimoto
                   ` (123 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:54 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8985.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index bcf3473..8eec022 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -1026,9 +1026,10 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int wm8985_probe(struct snd_soc_codec *codec)
+static int wm8985_probe(struct snd_soc_component *component)
 {
 	size_t i;
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8985_priv *wm8985;
 	int ret;
 
@@ -1106,11 +1107,11 @@ static struct snd_soc_dai_driver wm8985_dai = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8985 = {
-	.probe = wm8985_probe,
 	.set_bias_level = wm8985_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8985_probe,
 		.controls		= wm8985_common_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8985_common_snd_controls),
 		.dapm_widgets		= wm8985_common_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 004/127] ASoC: use component probe/remove on wm8978
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2016-08-09  4:54 ` [PATCH 003/127] ASoC: use component probe/remove on wm8985 Kuninori Morimoto
@ 2016-08-09  4:54 ` Kuninori Morimoto
  2016-08-09  4:55 ` [PATCH 005/127] ASoC: use component probe/remove on wm8974 Kuninori Morimoto
                   ` (122 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:54 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8978.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index 910b36f..3c057b2 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -971,8 +971,9 @@ static const int update_reg[] = {
 	WM8978_ROUT2_SPK_CONTROL,
 };
 
-static int wm8978_probe(struct snd_soc_codec *codec)
+static int wm8978_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
 	int i;
 
@@ -994,12 +995,12 @@ static int wm8978_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8978 = {
-	.probe =	wm8978_probe,
 	.suspend =	wm8978_suspend,
 	.resume =	wm8978_resume,
 	.set_bias_level = wm8978_set_bias_level,
 
 	.component_driver = {
+		.probe			= wm8978_probe,
 		.controls		= wm8978_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8978_snd_controls),
 		.dapm_widgets		= wm8978_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 005/127] ASoC: use component probe/remove on wm8974
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (3 preceding siblings ...)
  2016-08-09  4:54 ` [PATCH 004/127] ASoC: use component probe/remove on wm8978 Kuninori Morimoto
@ 2016-08-09  4:55 ` Kuninori Morimoto
  2016-08-09  4:55 ` [PATCH 006/127] ASoC: use component probe/remove on wm8962 Kuninori Morimoto
                   ` (121 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8974.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index fbda6e3..3da4e44 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -663,8 +663,9 @@ static const struct regmap_config wm8974_regmap = {
 	.cache_type = REGCACHE_FLAT,
 };
 
-static int wm8974_probe(struct snd_soc_codec *codec)
+static int wm8974_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret = 0;
 
 	ret = wm8974_reset(codec);
@@ -677,11 +678,11 @@ static int wm8974_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8974 = {
-	.probe = 	wm8974_probe,
 	.set_bias_level = wm8974_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8974_probe,
 		.controls		= wm8974_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8974_snd_controls),
 		.dapm_widgets		= wm8974_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 006/127] ASoC: use component probe/remove on wm8962
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (4 preceding siblings ...)
  2016-08-09  4:55 ` [PATCH 005/127] ASoC: use component probe/remove on wm8974 Kuninori Morimoto
@ 2016-08-09  4:55 ` Kuninori Morimoto
  2016-08-09  4:55 ` [PATCH 025/127] ASoC: use component probe/remove on sta32x Kuninori Morimoto
                   ` (120 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8962.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index f3109da..71b37f3 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3402,8 +3402,9 @@ static void wm8962_free_gpio(struct snd_soc_codec *codec)
 }
 #endif
 
-static int wm8962_probe(struct snd_soc_codec *codec)
+static int wm8962_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	int ret;
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
@@ -3463,8 +3464,9 @@ static int wm8962_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8962_remove(struct snd_soc_codec *codec)
+static void wm8962_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
 	int i;
 
@@ -3475,16 +3477,16 @@ static int wm8962_remove(struct snd_soc_codec *codec)
 	for (i = 0; i < ARRAY_SIZE(wm8962->supplies); i++)
 		regulator_unregister_notifier(wm8962->supplies[i].consumer,
 					      &wm8962->disable_nb[i]);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8962 = {
-	.probe =	wm8962_probe,
-	.remove =	wm8962_remove,
 	.set_bias_level = wm8962_set_bias_level,
 	.set_pll = wm8962_set_fll,
 	.idle_bias_off = true,
+	.component_driver = {
+		.probe			= wm8962_probe,
+		.remove			= wm8962_remove,
+	},
 };
 
 /* Improve power consumption for IN4 DC measurement mode */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 025/127] ASoC: use component probe/remove on sta32x
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (5 preceding siblings ...)
  2016-08-09  4:55 ` [PATCH 006/127] ASoC: use component probe/remove on wm8962 Kuninori Morimoto
@ 2016-08-09  4:55 ` Kuninori Morimoto
  2016-08-09  4:56 ` [PATCH 007/127] ASoC: use component probe/remove on wm8960 Kuninori Morimoto
                   ` (119 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/sta32x.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 0790ae8..3741399 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -875,8 +875,9 @@ static struct snd_soc_dai_driver sta32x_dai = {
 	.ops = &sta32x_dai_ops,
 };
 
-static int sta32x_probe(struct snd_soc_codec *codec)
+static int sta32x_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
 	struct sta32x_platform_data *pdata = sta32x->pdata;
 	int i, ret = 0, thermal = 0;
@@ -976,22 +977,21 @@ static int sta32x_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int sta32x_remove(struct snd_soc_codec *codec)
+static void sta32x_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
 
 	sta32x_watchdog_stop(sta32x);
 	regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
-
-	return 0;
 }
 
 static const struct snd_soc_codec_driver sta32x_codec = {
-	.probe =		sta32x_probe,
-	.remove =		sta32x_remove,
 	.set_bias_level =	sta32x_set_bias_level,
 	.suspend_bias_off =	true,
 	.component_driver = {
+		.probe =		sta32x_probe,
+		.remove =		sta32x_remove,
 		.controls =		sta32x_snd_controls,
 		.num_controls =		ARRAY_SIZE(sta32x_snd_controls),
 		.dapm_widgets =		sta32x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 007/127] ASoC: use component probe/remove on wm8960
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (6 preceding siblings ...)
  2016-08-09  4:55 ` [PATCH 025/127] ASoC: use component probe/remove on sta32x Kuninori Morimoto
@ 2016-08-09  4:56 ` Kuninori Morimoto
  2016-08-09  4:56 ` [PATCH 008/127] ASoC: use component probe/remove on wm8776 Kuninori Morimoto
                   ` (118 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8960.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index d7f444f..185cff0 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -1247,8 +1247,9 @@ static struct snd_soc_dai_driver wm8960_dai = {
 	.symmetric_rates = 1,
 };
 
-static int wm8960_probe(struct snd_soc_codec *codec)
+static int wm8960_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
 	struct wm8960_data *pdata = &wm8960->pdata;
 
@@ -1265,9 +1266,11 @@ static int wm8960_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8960 = {
-	.probe =	wm8960_probe,
 	.set_bias_level = wm8960_set_bias_level,
 	.suspend_bias_off = true,
+	.component_driver = {
+		.probe			= wm8960_probe,
+	},
 };
 
 static const struct regmap_config wm8960_regmap = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 008/127] ASoC: use component probe/remove on wm8776
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (7 preceding siblings ...)
  2016-08-09  4:56 ` [PATCH 007/127] ASoC: use component probe/remove on wm8960 Kuninori Morimoto
@ 2016-08-09  4:56 ` Kuninori Morimoto
  2016-08-09  4:56 ` [PATCH 009/127] ASoC: use component probe/remove on wm8770 Kuninori Morimoto
                   ` (117 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8776.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index f17a3a8..6a4cf65 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -407,8 +407,9 @@ static struct snd_soc_dai_driver wm8776_dai[] = {
 	},
 };
 
-static int wm8776_probe(struct snd_soc_codec *codec)
+static int wm8776_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret = 0;
 
 	ret = wm8776_reset(codec);
@@ -426,11 +427,11 @@ static int wm8776_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8776 = {
-	.probe = 	wm8776_probe,
 	.set_bias_level = wm8776_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8776_probe,
 		.controls		= wm8776_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8776_snd_controls),
 		.dapm_widgets		= wm8776_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 009/127] ASoC: use component probe/remove on wm8770
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (8 preceding siblings ...)
  2016-08-09  4:56 ` [PATCH 008/127] ASoC: use component probe/remove on wm8776 Kuninori Morimoto
@ 2016-08-09  4:56 ` Kuninori Morimoto
  2016-08-09  4:57 ` [PATCH 010/127] ASoC: use component probe/remove on wm8753 Kuninori Morimoto
                   ` (116 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8770.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c
index 8783a5f..c522c95 100644
--- a/sound/soc/codecs/wm8770.c
+++ b/sound/soc/codecs/wm8770.c
@@ -567,8 +567,9 @@ static struct snd_soc_dai_driver wm8770_dai = {
 	.symmetric_rates = 1
 };
 
-static int wm8770_probe(struct snd_soc_codec *codec)
+static int wm8770_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8770_priv *wm8770;
 	int ret;
 
@@ -609,11 +610,11 @@ err_reg_enable:
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8770 = {
-	.probe = wm8770_probe,
 	.set_bias_level = wm8770_set_bias_level,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8770_probe,
 		.controls		= wm8770_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8770_snd_controls),
 		.dapm_widgets		= wm8770_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 010/127] ASoC: use component probe/remove on wm8753
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (9 preceding siblings ...)
  2016-08-09  4:56 ` [PATCH 009/127] ASoC: use component probe/remove on wm8770 Kuninori Morimoto
@ 2016-08-09  4:57 ` Kuninori Morimoto
  2016-08-09  4:57 ` [PATCH 011/127] ASoC: use component probe/remove on wm8750 Kuninori Morimoto
                   ` (115 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8753.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 1bb272c..9e7a013 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1448,8 +1448,9 @@ static int wm8753_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8753_probe(struct snd_soc_codec *codec)
+static int wm8753_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -1479,12 +1480,12 @@ static int wm8753_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8753 = {
-	.probe =	wm8753_probe,
 	.resume =	wm8753_resume,
 	.set_bias_level = wm8753_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8753_probe,
 		.controls		= wm8753_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8753_snd_controls),
 		.dapm_widgets		= wm8753_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 011/127] ASoC: use component probe/remove on wm8750
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (10 preceding siblings ...)
  2016-08-09  4:57 ` [PATCH 010/127] ASoC: use component probe/remove on wm8753 Kuninori Morimoto
@ 2016-08-09  4:57 ` Kuninori Morimoto
  2016-08-09  4:58 ` [PATCH 012/127] ASoC: use component probe/remove on wm8741 Kuninori Morimoto
                   ` (114 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8750.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index a96a145..88fc2b5 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -685,8 +685,9 @@ static struct snd_soc_dai_driver wm8750_dai = {
 	.ops = &wm8750_dai_ops,
 };
 
-static int wm8750_probe(struct snd_soc_codec *codec)
+static int wm8750_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret;
 
 	ret = wm8750_reset(codec);
@@ -709,11 +710,11 @@ static int wm8750_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
-	.probe =	wm8750_probe,
 	.set_bias_level = wm8750_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8750_probe,
 		.controls		= wm8750_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8750_snd_controls),
 		.dapm_widgets		= wm8750_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 012/127] ASoC: use component probe/remove on wm8741
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (11 preceding siblings ...)
  2016-08-09  4:57 ` [PATCH 011/127] ASoC: use component probe/remove on wm8750 Kuninori Morimoto
@ 2016-08-09  4:58 ` Kuninori Morimoto
  2016-08-09  4:58 ` [PATCH 013/127] ASoC: use component probe/remove on wm8737 Kuninori Morimoto
                   ` (113 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:58 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8741.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 3e43272..381a3fb 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -449,8 +449,9 @@ static int wm8741_add_controls(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8741_probe(struct snd_soc_codec *codec)
+static int wm8741_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
 	int ret = 0;
 
@@ -488,21 +489,20 @@ err_get:
 	return ret;
 }
 
-static int wm8741_remove(struct snd_soc_codec *codec)
+static void wm8741_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(ARRAY_SIZE(wm8741->supplies), wm8741->supplies);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8741 = {
-	.probe =	wm8741_probe,
-	.remove =	wm8741_remove,
 	.resume =	wm8741_resume,
 
 	.component_driver = {
+		.probe			= wm8741_probe,
+		.remove			= wm8741_remove,
 		.dapm_widgets		= wm8741_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(wm8741_dapm_widgets),
 		.dapm_routes		= wm8741_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 013/127] ASoC: use component probe/remove on wm8737
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (12 preceding siblings ...)
  2016-08-09  4:58 ` [PATCH 012/127] ASoC: use component probe/remove on wm8741 Kuninori Morimoto
@ 2016-08-09  4:58 ` Kuninori Morimoto
  2016-08-09  4:58 ` [PATCH 014/127] ASoC: use component probe/remove on wm8711 Kuninori Morimoto
                   ` (112 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:58 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8737.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c
index 728c42c..9670959 100644
--- a/sound/soc/codecs/wm8737.c
+++ b/sound/soc/codecs/wm8737.c
@@ -537,8 +537,9 @@ static struct snd_soc_dai_driver wm8737_dai = {
 	.ops = &wm8737_dai_ops,
 };
 
-static int wm8737_probe(struct snd_soc_codec *codec)
+static int wm8737_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -574,11 +575,11 @@ err_get:
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
-	.probe		= wm8737_probe,
 	.set_bias_level = wm8737_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8737_probe,
 		.controls		= wm8737_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8737_snd_controls),
 		.dapm_widgets		= wm8737_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 014/127] ASoC: use component probe/remove on wm8711
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (13 preceding siblings ...)
  2016-08-09  4:58 ` [PATCH 013/127] ASoC: use component probe/remove on wm8737 Kuninori Morimoto
@ 2016-08-09  4:58 ` Kuninori Morimoto
  2016-08-09  4:59 ` [PATCH 015/127] ASoC: use component probe/remove on wm8580 Kuninori Morimoto
                   ` (111 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:58 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8711.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 4e8ebef..06dcc468 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -349,8 +349,9 @@ static struct snd_soc_dai_driver wm8711_dai = {
 	.ops = &wm8711_ops,
 };
 
-static int wm8711_probe(struct snd_soc_codec *codec)
+static int wm8711_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret;
 
 	ret = wm8711_reset(codec);
@@ -368,11 +369,11 @@ static int wm8711_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8711 = {
-	.probe =	wm8711_probe,
 	.set_bias_level = wm8711_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8711_probe,
 		.controls		= wm8711_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8711_snd_controls),
 		.dapm_widgets		= wm8711_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 015/127] ASoC: use component probe/remove on wm8580
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (14 preceding siblings ...)
  2016-08-09  4:58 ` [PATCH 014/127] ASoC: use component probe/remove on wm8711 Kuninori Morimoto
@ 2016-08-09  4:59 ` Kuninori Morimoto
  2016-08-09  4:59 ` [PATCH 016/127] ASoC: use component probe/remove on wm8523 Kuninori Morimoto
                   ` (110 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8580.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 2e69270..2a812a9 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -862,8 +862,9 @@ static struct snd_soc_dai_driver wm8580_dai[] = {
 	},
 };
 
-static int wm8580_probe(struct snd_soc_codec *codec)
+static int wm8580_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
 	int ret = 0;
 
@@ -890,21 +891,20 @@ err_regulator_get:
 }
 
 /* power down chip */
-static int wm8580_remove(struct snd_soc_codec *codec)
+static void wm8580_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(ARRAY_SIZE(wm8580->supplies), wm8580->supplies);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8580 = {
-	.probe =	wm8580_probe,
-	.remove =	wm8580_remove,
 	.set_bias_level = wm8580_set_bias_level,
 
 	.component_driver = {
+		.probe			= wm8580_probe,
+		.remove			= wm8580_remove,
 		.controls		= wm8580_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8580_snd_controls),
 		.dapm_widgets		= wm8580_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 016/127] ASoC: use component probe/remove on wm8523
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (15 preceding siblings ...)
  2016-08-09  4:59 ` [PATCH 015/127] ASoC: use component probe/remove on wm8580 Kuninori Morimoto
@ 2016-08-09  4:59 ` Kuninori Morimoto
  2016-08-09  5:00 ` [PATCH 017/127] ASoC: use component probe/remove on wm8510 Kuninori Morimoto
                   ` (109 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  4:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8523.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 0bb189a..6cfc86e 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -397,8 +397,9 @@ static struct snd_soc_dai_driver wm8523_dai = {
 	.ops = &wm8523_dai_ops,
 };
 
-static int wm8523_probe(struct snd_soc_codec *codec)
+static int wm8523_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
 
 	wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
@@ -414,11 +415,11 @@ static int wm8523_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8523 = {
-	.probe =	wm8523_probe,
 	.set_bias_level = wm8523_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8523_probe,
 		.controls		= wm8523_controls,
 		.num_controls		= ARRAY_SIZE(wm8523_controls),
 		.dapm_widgets		= wm8523_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 017/127] ASoC: use component probe/remove on wm8510
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (16 preceding siblings ...)
  2016-08-09  4:59 ` [PATCH 016/127] ASoC: use component probe/remove on wm8523 Kuninori Morimoto
@ 2016-08-09  5:00 ` Kuninori Morimoto
  2016-08-09  5:00 ` [PATCH 018/127] ASoC: use component probe/remove on tlv320aic3x Kuninori Morimoto
                   ` (108 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8510.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 7f93adf..c7a07c0 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -574,19 +574,21 @@ static struct snd_soc_dai_driver wm8510_dai = {
 	.symmetric_rates = 1,
 };
 
-static int wm8510_probe(struct snd_soc_codec *codec)
+static int wm8510_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	wm8510_reset(codec);
 
 	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8510 = {
-	.probe =	wm8510_probe,
 	.set_bias_level = wm8510_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8510_probe,
 		.controls		= wm8510_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8510_snd_controls),
 		.dapm_widgets		= wm8510_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 018/127] ASoC: use component probe/remove on tlv320aic3x
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (17 preceding siblings ...)
  2016-08-09  5:00 ` [PATCH 017/127] ASoC: use component probe/remove on wm8510 Kuninori Morimoto
@ 2016-08-09  5:00 ` Kuninori Morimoto
  2016-08-09  5:00 ` [PATCH 019/127] ASoC: use component probe/remove on tlv320aic31xx Kuninori Morimoto
                   ` (107 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320aic3x.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 5a8d96e..502ce9f 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1569,8 +1569,9 @@ static bool aic3x_is_shared_reset(struct aic3x_priv *aic3x)
 	return false;
 }
 
-static int aic3x_probe(struct snd_soc_codec *codec)
+static int aic3x_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
 	int ret, i;
 
@@ -1652,8 +1653,9 @@ err_notif:
 	return ret;
 }
 
-static int aic3x_remove(struct snd_soc_codec *codec)
+static void aic3x_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
 	int i;
 
@@ -1661,16 +1663,14 @@ static int aic3x_remove(struct snd_soc_codec *codec)
 	for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++)
 		regulator_unregister_notifier(aic3x->supplies[i].consumer,
 					      &aic3x->disable_nb[i].nb);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
 	.set_bias_level = aic3x_set_bias_level,
 	.idle_bias_off = true,
-	.probe = aic3x_probe,
-	.remove = aic3x_remove,
 	.component_driver = {
+		.probe			= aic3x_probe,
+		.remove			= aic3x_remove,
 		.controls		= aic3x_snd_controls,
 		.num_controls		= ARRAY_SIZE(aic3x_snd_controls),
 		.dapm_widgets		= aic3x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 019/127] ASoC: use component probe/remove on tlv320aic31xx
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (18 preceding siblings ...)
  2016-08-09  5:00 ` [PATCH 018/127] ASoC: use component probe/remove on tlv320aic3x Kuninori Morimoto
@ 2016-08-09  5:00 ` Kuninori Morimoto
  2016-08-09  5:01 ` [PATCH 020/127] ASoC: use component probe/remove on tlv320aic23 Kuninori Morimoto
                   ` (106 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320aic31xx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index e46fb47..ea2f986 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1058,9 +1058,10 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int aic31xx_codec_probe(struct snd_soc_codec *codec)
+static int aic31xx_codec_probe(struct snd_soc_component *component)
 {
 	int ret = 0;
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);
 	int i;
 
@@ -1096,25 +1097,24 @@ static int aic31xx_codec_probe(struct snd_soc_codec *codec)
 	return ret;
 }
 
-static int aic31xx_codec_remove(struct snd_soc_codec *codec)
+static void aic31xx_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(aic31xx->supplies); i++)
 		regulator_unregister_notifier(aic31xx->supplies[i].consumer,
 					      &aic31xx->disable_nb[i].nb);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_driver_aic31xx = {
-	.probe			= aic31xx_codec_probe,
-	.remove			= aic31xx_codec_remove,
 	.set_bias_level		= aic31xx_set_bias_level,
 	.suspend_bias_off	= true,
 
 	.component_driver = {
+		.probe			= aic31xx_codec_probe,
+		.remove			= aic31xx_codec_remove,
 		.controls		= aic31xx_snd_controls,
 		.num_controls		= ARRAY_SIZE(aic31xx_snd_controls),
 		.dapm_widgets		= aic31xx_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 020/127] ASoC: use component probe/remove on tlv320aic23
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (19 preceding siblings ...)
  2016-08-09  5:00 ` [PATCH 019/127] ASoC: use component probe/remove on tlv320aic31xx Kuninori Morimoto
@ 2016-08-09  5:01 ` Kuninori Morimoto
  2016-08-09  5:01 ` [PATCH 021/127] ASoC: use component probe/remove on tas5720 Kuninori Morimoto
                   ` (105 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320aic23.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 410cae0..69e7e80 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -548,8 +548,10 @@ static int tlv320aic23_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
+static int tlv320aic23_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	/* Reset codec */
 	snd_soc_write(codec, TLV320AIC23_RESET, 0);
 
@@ -578,12 +580,12 @@ static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = {
-	.probe = tlv320aic23_codec_probe,
 	.resume = tlv320aic23_resume,
 	.set_bias_level = tlv320aic23_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= tlv320aic23_codec_probe,
 		.controls		= tlv320aic23_snd_controls,
 		.num_controls		= ARRAY_SIZE(tlv320aic23_snd_controls),
 		.dapm_widgets		= tlv320aic23_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 021/127] ASoC: use component probe/remove on tas5720
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (20 preceding siblings ...)
  2016-08-09  5:01 ` [PATCH 020/127] ASoC: use component probe/remove on tlv320aic23 Kuninori Morimoto
@ 2016-08-09  5:01 ` Kuninori Morimoto
  2016-08-09  5:02 ` [PATCH 022/127] ASoC: use component probe/remove on tas2552 Kuninori Morimoto
                   ` (104 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tas5720.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index c65b917..d531ffd 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -261,8 +261,9 @@ out:
 			      msecs_to_jiffies(TAS5720_FAULT_CHECK_INTERVAL));
 }
 
-static int tas5720_codec_probe(struct snd_soc_codec *codec)
+static int tas5720_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec);
 	unsigned int device_id;
 	int ret;
@@ -320,8 +321,9 @@ probe_fail:
 	return ret;
 }
 
-static int tas5720_codec_remove(struct snd_soc_codec *codec)
+static void tas5720_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -331,8 +333,6 @@ static int tas5720_codec_remove(struct snd_soc_codec *codec)
 				     tas5720->supplies);
 	if (ret < 0)
 		dev_err(codec->dev, "failed to disable supplies: %d\n", ret);
-
-	return ret;
 };
 
 static int tas5720_dac_event(struct snd_soc_dapm_widget *w,
@@ -484,12 +484,12 @@ static const struct snd_soc_dapm_route tas5720_audio_map[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_tas5720 = {
-	.probe = tas5720_codec_probe,
-	.remove = tas5720_codec_remove,
 	.suspend = tas5720_suspend,
 	.resume = tas5720_resume,
 
 	.component_driver = {
+		.probe			= tas5720_codec_probe,
+		.remove			= tas5720_codec_remove,
 		.controls		= tas5720_snd_controls,
 		.num_controls		= ARRAY_SIZE(tas5720_snd_controls),
 		.dapm_widgets		= tas5720_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 022/127] ASoC: use component probe/remove on tas2552
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (21 preceding siblings ...)
  2016-08-09  5:01 ` [PATCH 021/127] ASoC: use component probe/remove on tas5720 Kuninori Morimoto
@ 2016-08-09  5:02 ` Kuninori Morimoto
  2016-08-09  5:02 ` [PATCH 023/127] ASoC: use component probe/remove on sti-sas Kuninori Morimoto
                   ` (103 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tas2552.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index baf455e..1739183 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -567,8 +567,9 @@ static const struct snd_kcontrol_new tas2552_snd_controls[] = {
 	SOC_ENUM("DIN source", tas2552_din_source_enum),
 };
 
-static int tas2552_codec_probe(struct snd_soc_codec *codec)
+static int tas2552_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -614,15 +615,14 @@ probe_fail:
 	return -EIO;
 }
 
-static int tas2552_codec_remove(struct snd_soc_codec *codec)
+static void tas2552_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec);
 
 	pm_runtime_put(codec->dev);
 
 	gpiod_set_value(tas2552->enable_gpio, 0);
-
-	return 0;
 };
 
 #ifdef CONFIG_PM
@@ -661,13 +661,13 @@ static int tas2552_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_tas2552 = {
-	.probe = tas2552_codec_probe,
-	.remove = tas2552_codec_remove,
 	.suspend =	tas2552_suspend,
 	.resume = tas2552_resume,
 	.ignore_pmdown_time = true,
 
 	.component_driver = {
+		.probe			= tas2552_codec_probe,
+		.remove			= tas2552_codec_remove,
 		.controls		= tas2552_snd_controls,
 		.num_controls		= ARRAY_SIZE(tas2552_snd_controls),
 		.dapm_widgets		= tas2552_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 023/127] ASoC: use component probe/remove on sti-sas
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (22 preceding siblings ...)
  2016-08-09  5:02 ` [PATCH 022/127] ASoC: use component probe/remove on tas2552 Kuninori Morimoto
@ 2016-08-09  5:02 ` Kuninori Morimoto
  2016-08-09  5:03 ` [PATCH 024/127] ASoC: use component probe/remove on sta350 Kuninori Morimoto
                   ` (102 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/sti-sas.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 7b31ee9..81b8ade 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -516,8 +516,9 @@ static int sti_sas_resume(struct snd_soc_codec *codec)
 #define sti_sas_resume NULL
 #endif
 
-static int sti_sas_codec_probe(struct snd_soc_codec *codec)
+static int sti_sas_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sti_sas_data *drvdata = dev_get_drvdata(codec->dev);
 	int ret;
 
@@ -527,8 +528,10 @@ static int sti_sas_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver sti_sas_driver = {
-	.probe = sti_sas_codec_probe,
 	.resume = sti_sas_resume,
+	.component_driver = {
+		.probe			= sti_sas_codec_probe,
+	},
 };
 
 static const struct of_device_id sti_sas_dev_match[] = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 024/127] ASoC: use component probe/remove on sta350
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (23 preceding siblings ...)
  2016-08-09  5:02 ` [PATCH 023/127] ASoC: use component probe/remove on sti-sas Kuninori Morimoto
@ 2016-08-09  5:03 ` Kuninori Morimoto
  2016-08-09  5:04 ` [PATCH 026/127] ASoC: use component probe/remove on ssm2602 Kuninori Morimoto
                   ` (101 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:03 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/sta350.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
index 9644c20..c07c92e 100644
--- a/sound/soc/codecs/sta350.c
+++ b/sound/soc/codecs/sta350.c
@@ -911,8 +911,9 @@ static struct snd_soc_dai_driver sta350_dai = {
 	.ops = &sta350_dai_ops,
 };
 
-static int sta350_probe(struct snd_soc_codec *codec)
+static int sta350_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec);
 	struct sta350_platform_data *pdata = sta350->pdata;
 	int i, ret = 0, thermal = 0;
@@ -1043,21 +1044,20 @@ static int sta350_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int sta350_remove(struct snd_soc_codec *codec)
+static void sta350_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies);
-
-	return 0;
 }
 
 static const struct snd_soc_codec_driver sta350_codec = {
-	.probe =		sta350_probe,
-	.remove =		sta350_remove,
 	.set_bias_level =	sta350_set_bias_level,
 	.suspend_bias_off =	true,
 	.component_driver = {
+		.probe =		sta350_probe,
+		.remove =		sta350_remove,
 		.controls =		sta350_snd_controls,
 		.num_controls =		ARRAY_SIZE(sta350_snd_controls),
 		.dapm_widgets =		sta350_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 026/127] ASoC: use component probe/remove on ssm2602
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (24 preceding siblings ...)
  2016-08-09  5:03 ` [PATCH 024/127] ASoC: use component probe/remove on sta350 Kuninori Morimoto
@ 2016-08-09  5:04 ` Kuninori Morimoto
  2016-08-09  5:05 ` [PATCH 027/127] ASoC: use component probe/remove on sgtl5000 Kuninori Morimoto
                   ` (100 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:04 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ssm2602.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 993bde2..2b898e4 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -559,8 +559,9 @@ static int ssm2604_codec_probe(struct snd_soc_codec *codec)
 			ARRAY_SIZE(ssm2604_routes));
 }
 
-static int ssm260x_codec_probe(struct snd_soc_codec *codec)
+static int ssm260x_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -592,12 +593,12 @@ static int ssm260x_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ssm2602 = {
-	.probe =	ssm260x_codec_probe,
 	.resume =	ssm2602_resume,
 	.set_bias_level = ssm2602_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= ssm260x_codec_probe,
 		.controls		= ssm260x_snd_controls,
 		.num_controls		= ARRAY_SIZE(ssm260x_snd_controls),
 		.dapm_widgets		= ssm260x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 027/127] ASoC: use component probe/remove on sgtl5000
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (25 preceding siblings ...)
  2016-08-09  5:04 ` [PATCH 026/127] ASoC: use component probe/remove on ssm2602 Kuninori Morimoto
@ 2016-08-09  5:05 ` Kuninori Morimoto
  2016-08-09  5:06 ` [PATCH 028/127] ASoC: use component probe/remove on rt5631 Kuninori Morimoto
                   ` (99 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:05 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/sgtl5000.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index a635bd0..77b9244 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1083,9 +1083,10 @@ static int sgtl5000_enable_regulators(struct i2c_client *client)
 	return ret;
 }
 
-static int sgtl5000_probe(struct snd_soc_codec *codec)
+static int sgtl5000_probe(struct snd_soc_component *component)
 {
 	int ret;
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
 
 	/* power up sgtl5000 */
@@ -1141,17 +1142,11 @@ err:
 	return ret;
 }
 
-static int sgtl5000_remove(struct snd_soc_codec *codec)
-{
-	return 0;
-}
-
 static struct snd_soc_codec_driver sgtl5000_driver = {
-	.probe = sgtl5000_probe,
-	.remove = sgtl5000_remove,
 	.set_bias_level = sgtl5000_set_bias_level,
 	.suspend_bias_off = true,
 	.component_driver = {
+		.probe			= sgtl5000_probe,
 		.controls		= sgtl5000_snd_controls,
 		.num_controls		= ARRAY_SIZE(sgtl5000_snd_controls),
 		.dapm_widgets		= sgtl5000_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 028/127] ASoC: use component probe/remove on rt5631
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (26 preceding siblings ...)
  2016-08-09  5:05 ` [PATCH 027/127] ASoC: use component probe/remove on sgtl5000 Kuninori Morimoto
@ 2016-08-09  5:06 ` Kuninori Morimoto
  2016-08-09  5:06 ` [PATCH 029/127] ASoC: use component probe/remove on rt5616 Kuninori Morimoto
                   ` (98 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5631.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 0e41808..f3a3c4e 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1572,8 +1572,9 @@ static int rt5631_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5631_probe(struct snd_soc_codec *codec)
+static int rt5631_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
 	unsigned int val;
 
@@ -1654,10 +1655,10 @@ static struct snd_soc_dai_driver rt5631_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5631 = {
-	.probe = rt5631_probe,
 	.set_bias_level = rt5631_set_bias_level,
 	.suspend_bias_off = true,
 	.component_driver = {
+		.probe			= rt5631_probe,
 		.controls		= rt5631_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5631_snd_controls),
 		.dapm_widgets		= rt5631_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 029/127] ASoC: use component probe/remove on rt5616
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (27 preceding siblings ...)
  2016-08-09  5:06 ` [PATCH 028/127] ASoC: use component probe/remove on rt5631 Kuninori Morimoto
@ 2016-08-09  5:06 ` Kuninori Morimoto
  2016-08-09  5:07 ` [PATCH 030/127] ASoC: use component probe/remove on inno_rk3036 Kuninori Morimoto
                   ` (97 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5616.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index e92a149..aae7f73 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1225,8 +1225,9 @@ static int rt5616_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5616_probe(struct snd_soc_codec *codec)
+static int rt5616_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5616_priv *rt5616 = snd_soc_codec_get_drvdata(codec);
 
 	/* Check if MCLK provided */
@@ -1297,12 +1298,12 @@ struct snd_soc_dai_driver rt5616_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5616 = {
-	.probe = rt5616_probe,
 	.suspend = rt5616_suspend,
 	.resume = rt5616_resume,
 	.set_bias_level = rt5616_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5616_probe,
 		.controls		= rt5616_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5616_snd_controls),
 		.dapm_widgets		= rt5616_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 030/127] ASoC: use component probe/remove on inno_rk3036
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (28 preceding siblings ...)
  2016-08-09  5:06 ` [PATCH 029/127] ASoC: use component probe/remove on rt5616 Kuninori Morimoto
@ 2016-08-09  5:07 ` Kuninori Morimoto
  2016-08-09  5:07 ` [PATCH 031/127] ASoC: use component probe/remove on es8328 Kuninori Morimoto
                   ` (96 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/inno_rk3036.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c
index b918ba5..6890581 100644
--- a/sound/soc/codecs/inno_rk3036.c
+++ b/sound/soc/codecs/inno_rk3036.c
@@ -338,16 +338,20 @@ static void rk3036_codec_reset(struct snd_soc_codec *codec)
 		      INNO_R00_CSR_WORK | INNO_R00_CDCR_WORK);
 }
 
-static int rk3036_codec_probe(struct snd_soc_codec *codec)
+static int rk3036_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	rk3036_codec_reset(codec);
+
 	return 0;
 }
 
-static int rk3036_codec_remove(struct snd_soc_codec *codec)
+static void rk3036_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	rk3036_codec_reset(codec);
-	return 0;
 }
 
 static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec,
@@ -377,10 +381,10 @@ static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec,
 }
 
 static struct snd_soc_codec_driver rk3036_codec_driver = {
-	.probe			= rk3036_codec_probe,
-	.remove			= rk3036_codec_remove,
 	.set_bias_level		= rk3036_codec_set_bias_level,
 	.component_driver = {
+		.probe			= rk3036_codec_probe,
+		.remove			= rk3036_codec_remove,
 		.controls		= rk3036_codec_dapm_controls,
 		.num_controls		= ARRAY_SIZE(rk3036_codec_dapm_controls),
 		.dapm_routes		= rk3036_codec_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 031/127] ASoC: use component probe/remove on es8328
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (29 preceding siblings ...)
  2016-08-09  5:07 ` [PATCH 030/127] ASoC: use component probe/remove on inno_rk3036 Kuninori Morimoto
@ 2016-08-09  5:07 ` Kuninori Morimoto
  2016-08-09  5:08 ` [PATCH 032/127] ASoC: use component probe/remove on cs53l30 Kuninori Morimoto
                   ` (95 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:07 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/es8328.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 37722194..19e8d7e 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -755,8 +755,9 @@ static int es8328_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int es8328_codec_probe(struct snd_soc_codec *codec)
+static int es8328_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct es8328_priv *es8328;
 	int ret;
 
@@ -791,8 +792,9 @@ clk_fail:
 	return ret;
 }
 
-static int es8328_remove(struct snd_soc_codec *codec)
+static void es8328_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct es8328_priv *es8328;
 
 	es8328 = snd_soc_codec_get_drvdata(codec);
@@ -802,8 +804,6 @@ static int es8328_remove(struct snd_soc_codec *codec)
 
 	regulator_bulk_disable(ARRAY_SIZE(es8328->supplies),
 			       es8328->supplies);
-
-	return 0;
 }
 
 const struct regmap_config es8328_regmap_config = {
@@ -816,14 +816,14 @@ const struct regmap_config es8328_regmap_config = {
 EXPORT_SYMBOL_GPL(es8328_regmap_config);
 
 static struct snd_soc_codec_driver es8328_codec_driver = {
-	.probe		  = es8328_codec_probe,
 	.suspend	  = es8328_suspend,
 	.resume		  = es8328_resume,
-	.remove		  = es8328_remove,
 	.set_bias_level	  = es8328_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= es8328_codec_probe,
+		.remove			= es8328_remove,
 		.controls		= es8328_snd_controls,
 		.num_controls		= ARRAY_SIZE(es8328_snd_controls),
 		.dapm_widgets		= es8328_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 032/127] ASoC: use component probe/remove on cs53l30
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (30 preceding siblings ...)
  2016-08-09  5:07 ` [PATCH 031/127] ASoC: use component probe/remove on es8328 Kuninori Morimoto
@ 2016-08-09  5:08 ` Kuninori Morimoto
  2016-08-09  5:08 ` [PATCH 033/127] ASoC: use component probe/remove on cs42xx8 Kuninori Morimoto
                   ` (94 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs53l30.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index e244e08..c87f92a 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -877,8 +877,9 @@ static struct snd_soc_dai_driver cs53l30_dai = {
 	.symmetric_rates = 1,
 };
 
-static int cs53l30_codec_probe(struct snd_soc_codec *codec)
+static int cs53l30_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs53l30_private *priv = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -893,11 +894,11 @@ static int cs53l30_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver cs53l30_driver = {
-	.probe = cs53l30_codec_probe,
 	.set_bias_level = cs53l30_set_bias_level,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= cs53l30_codec_probe,
 		.controls		= cs53l30_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs53l30_snd_controls),
 		.dapm_widgets		= cs53l30_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 033/127] ASoC: use component probe/remove on cs42xx8
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (31 preceding siblings ...)
  2016-08-09  5:08 ` [PATCH 032/127] ASoC: use component probe/remove on cs53l30 Kuninori Morimoto
@ 2016-08-09  5:08 ` Kuninori Morimoto
  2016-08-09  5:08 ` [PATCH 034/127] ASoC: use component probe/remove on cs42l73 Kuninori Morimoto
                   ` (93 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs42xx8.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index b4d8737..268decb 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -383,8 +383,9 @@ const struct regmap_config cs42xx8_regmap_config = {
 };
 EXPORT_SYMBOL_GPL(cs42xx8_regmap_config);
 
-static int cs42xx8_codec_probe(struct snd_soc_codec *codec)
+static int cs42xx8_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs42xx8_priv *cs42xx8 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -408,10 +409,10 @@ static int cs42xx8_codec_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver cs42xx8_driver = {
-	.probe = cs42xx8_codec_probe,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= cs42xx8_codec_probe,
 		.controls		= cs42xx8_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs42xx8_snd_controls),
 		.dapm_widgets		= cs42xx8_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 034/127] ASoC: use component probe/remove on cs42l73
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (32 preceding siblings ...)
  2016-08-09  5:08 ` [PATCH 033/127] ASoC: use component probe/remove on cs42xx8 Kuninori Morimoto
@ 2016-08-09  5:08 ` Kuninori Morimoto
  2016-08-09  5:09 ` [PATCH 035/127] ASoC: use component probe/remove on cs42l56 Kuninori Morimoto
                   ` (92 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs42l73.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 01b573a..53788f4 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1235,8 +1235,9 @@ static struct snd_soc_dai_driver cs42l73_dai[] = {
 	 }
 };
 
-static int cs42l73_probe(struct snd_soc_codec *codec)
+static int cs42l73_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs42l73_private *cs42l73 = snd_soc_codec_get_drvdata(codec);
 
 	/* Set Charge Pump Frequency */
@@ -1253,11 +1254,11 @@ static int cs42l73_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver soc_codec_dev_cs42l73 = {
-	.probe = cs42l73_probe,
 	.set_bias_level = cs42l73_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= cs42l73_probe,
 		.controls		= cs42l73_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs42l73_snd_controls),
 		.dapm_widgets		= cs42l73_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 035/127] ASoC: use component probe/remove on cs42l56
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (33 preceding siblings ...)
  2016-08-09  5:08 ` [PATCH 034/127] ASoC: use component probe/remove on cs42l73 Kuninori Morimoto
@ 2016-08-09  5:09 ` Kuninori Morimoto
  2016-08-09  5:09 ` [PATCH 036/127] ASoC: use component probe/remove on cs42l52 Kuninori Morimoto
                   ` (91 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs42l56.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 54c1768..2e006ed 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -1101,27 +1101,29 @@ static void cs42l56_free_beep(struct snd_soc_codec *codec)
 			    CS42L56_BEEP_EN_MASK, 0);
 }
 
-static int cs42l56_probe(struct snd_soc_codec *codec)
+static int cs42l56_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	cs42l56_init_beep(codec);
 
 	return 0;
 }
 
-static int cs42l56_remove(struct snd_soc_codec *codec)
+static void cs42l56_remove(struct snd_soc_component *component)
 {
-	cs42l56_free_beep(codec);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 
-	return 0;
+	cs42l56_free_beep(codec);
 }
 
 static const struct snd_soc_codec_driver soc_codec_dev_cs42l56 = {
-	.probe = cs42l56_probe,
-	.remove = cs42l56_remove,
 	.set_bias_level = cs42l56_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= cs42l56_probe,
+		.remove			= cs42l56_remove,
 		.controls		= cs42l56_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs42l56_snd_controls),
 		.dapm_widgets		= cs42l56_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 036/127] ASoC: use component probe/remove on cs42l52
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (34 preceding siblings ...)
  2016-08-09  5:09 ` [PATCH 035/127] ASoC: use component probe/remove on cs42l56 Kuninori Morimoto
@ 2016-08-09  5:09 ` Kuninori Morimoto
  2016-08-09  5:10 ` [PATCH 037/127] ASoC: use component probe/remove on cs42l51 Kuninori Morimoto
                   ` (90 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs42l52.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 0d9c4a5..067948b 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1027,8 +1027,9 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec)
 			    CS42L52_BEEP_EN_MASK, 0);
 }
 
-static int cs42l52_probe(struct snd_soc_codec *codec)
+static int cs42l52_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
 
 	regcache_cache_only(cs42l52->regmap, true);
@@ -1043,20 +1044,20 @@ static int cs42l52_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int cs42l52_remove(struct snd_soc_codec *codec)
+static void cs42l52_remove(struct snd_soc_component *component)
 {
-	cs42l52_free_beep(codec);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 
-	return 0;
+	cs42l52_free_beep(codec);
 }
 
 static const struct snd_soc_codec_driver soc_codec_dev_cs42l52 = {
-	.probe = cs42l52_probe,
-	.remove = cs42l52_remove,
 	.set_bias_level = cs42l52_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= cs42l52_probe,
+		.remove			= cs42l52_remove,
 		.controls		= cs42l52_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs42l52_snd_controls),
 		.dapm_widgets		= cs42l52_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 037/127] ASoC: use component probe/remove on cs42l51
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (35 preceding siblings ...)
  2016-08-09  5:09 ` [PATCH 036/127] ASoC: use component probe/remove on cs42l52 Kuninori Morimoto
@ 2016-08-09  5:10 ` Kuninori Morimoto
  2016-08-09  5:10 ` [PATCH 038/127] ASoC: use component probe/remove on cs4271 Kuninori Morimoto
                   ` (89 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:10 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs42l51.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 96cfe38..c331193 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -484,8 +484,9 @@ static struct snd_soc_dai_driver cs42l51_dai = {
 	.ops = &cs42l51_dai_ops,
 };
 
-static int cs42l51_codec_probe(struct snd_soc_codec *codec)
+static int cs42l51_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret, reg;
 
 	/*
@@ -505,9 +506,8 @@ static int cs42l51_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_device_cs42l51 = {
-	.probe = cs42l51_codec_probe,
-
 	.component_driver = {
+		.probe			= cs42l51_codec_probe,
 		.controls		= cs42l51_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs42l51_snd_controls),
 		.dapm_widgets		= cs42l51_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 038/127] ASoC: use component probe/remove on cs4271
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (36 preceding siblings ...)
  2016-08-09  5:10 ` [PATCH 037/127] ASoC: use component probe/remove on cs42l51 Kuninori Morimoto
@ 2016-08-09  5:10 ` Kuninori Morimoto
  2016-08-09  5:11 ` [PATCH 039/127] ASoC: use component probe/remove on cs4270 Kuninori Morimoto
                   ` (88 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:10 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs4271.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 8c0f3b8..5f2673b 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -567,8 +567,9 @@ MODULE_DEVICE_TABLE(of, cs4271_dt_ids);
 EXPORT_SYMBOL_GPL(cs4271_dt_ids);
 #endif
 
-static int cs4271_codec_probe(struct snd_soc_codec *codec)
+static int cs4271_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
 	struct cs4271_platform_data *cs4271plat = codec->dev->platform_data;
 	int ret;
@@ -625,8 +626,9 @@ static int cs4271_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int cs4271_codec_remove(struct snd_soc_codec *codec)
+static void cs4271_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
 
 	if (gpio_is_valid(cs4271->gpio_nreset))
@@ -635,17 +637,15 @@ static int cs4271_codec_remove(struct snd_soc_codec *codec)
 
 	regcache_mark_dirty(cs4271->regmap);
 	regulator_bulk_disable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies);
-
-	return 0;
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_cs4271 = {
-	.probe			= cs4271_codec_probe,
-	.remove			= cs4271_codec_remove,
 	.suspend		= cs4271_soc_suspend,
 	.resume			= cs4271_soc_resume,
 
 	.component_driver = {
+		.probe			= cs4271_codec_probe,
+		.remove			= cs4271_codec_remove,
 		.controls		= cs4271_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs4271_snd_controls),
 		.dapm_widgets		= cs4271_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 039/127] ASoC: use component probe/remove on cs4270
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (37 preceding siblings ...)
  2016-08-09  5:10 ` [PATCH 038/127] ASoC: use component probe/remove on cs4271 Kuninori Morimoto
@ 2016-08-09  5:11 ` Kuninori Morimoto
  2016-08-09  5:12 ` [PATCH 040/127] ASoC: use component probe/remove on cs35l33 Kuninori Morimoto
                   ` (87 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs4270.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 18baea2..8e8bdca 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -501,8 +501,9 @@ static struct snd_soc_dai_driver cs4270_dai = {
  * This function is called when ASoC has all the pieces it needs to
  * instantiate a sound driver.
  */
-static int cs4270_probe(struct snd_soc_codec *codec)
+static int cs4270_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -541,13 +542,12 @@ static int cs4270_probe(struct snd_soc_codec *codec)
  *
  * This function is the counterpart to cs4270_probe().
  */
-static int cs4270_remove(struct snd_soc_codec *codec)
+static void cs4270_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), cs4270->supplies);
-
-	return 0;
 };
 
 #ifdef CONFIG_PM
@@ -612,12 +612,12 @@ static int cs4270_soc_resume(struct snd_soc_codec *codec)
  * ASoC codec driver structure
  */
 static const struct snd_soc_codec_driver soc_codec_device_cs4270 = {
-	.probe =		cs4270_probe,
-	.remove =		cs4270_remove,
 	.suspend =		cs4270_soc_suspend,
 	.resume =		cs4270_soc_resume,
 
 	.component_driver = {
+		.probe =		cs4270_probe,
+		.remove =		cs4270_remove,
 		.controls =		cs4270_snd_controls,
 		.num_controls =		ARRAY_SIZE(cs4270_snd_controls),
 		.dapm_widgets =		cs4270_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 040/127] ASoC: use component probe/remove on cs35l33
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (38 preceding siblings ...)
  2016-08-09  5:11 ` [PATCH 039/127] ASoC: use component probe/remove on cs4270 Kuninori Morimoto
@ 2016-08-09  5:12 ` Kuninori Morimoto
  2016-08-09  5:12 ` [PATCH 041/127] ASoC: use component probe/remove on alc5623 Kuninori Morimoto
                   ` (86 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:12 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs35l33.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 6df29fa..b6574f1 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -778,8 +778,9 @@ err:
 	return ret;
 }
 
-static int cs35l33_probe(struct snd_soc_codec *codec)
+static int cs35l33_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs35l33_private *cs35l33 = snd_soc_codec_get_drvdata(codec);
 
 	cs35l33->codec = codec;
@@ -832,12 +833,11 @@ static int cs35l33_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_cs35l33 = {
-	.probe = cs35l33_probe,
-
 	.set_bias_level = cs35l33_set_bias_level,
 	.set_sysclk = cs35l33_codec_set_sysclk,
 
 	.component_driver = {
+		.probe			= cs35l33_probe,
 		.controls		= cs35l33_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs35l33_snd_controls),
 		.dapm_widgets		= cs35l33_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 041/127] ASoC: use component probe/remove on alc5623
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (39 preceding siblings ...)
  2016-08-09  5:12 ` [PATCH 040/127] ASoC: use component probe/remove on cs35l33 Kuninori Morimoto
@ 2016-08-09  5:12 ` Kuninori Morimoto
  2016-08-09  5:12 ` [PATCH 042/127] ASoC: use component probe/remove on ak5386 Kuninori Morimoto
                   ` (85 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:12 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/alc5623.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index d2e3a3e..6b06c38 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -889,8 +889,9 @@ static int alc5623_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int alc5623_probe(struct snd_soc_codec *codec)
+static int alc5623_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -952,11 +953,13 @@ static int alc5623_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_device_alc5623 = {
-	.probe = alc5623_probe,
 	.suspend = alc5623_suspend,
 	.resume = alc5623_resume,
 	.set_bias_level = alc5623_set_bias_level,
 	.suspend_bias_off = true,
+	.component_driver = {
+		.probe			= alc5623_probe,
+	},
 };
 
 static const struct regmap_config alc5623_regmap = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 042/127] ASoC: use component probe/remove on ak5386
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (40 preceding siblings ...)
  2016-08-09  5:12 ` [PATCH 041/127] ASoC: use component probe/remove on alc5623 Kuninori Morimoto
@ 2016-08-09  5:12 ` Kuninori Morimoto
  2016-08-09  5:13 ` [PATCH 043/127] ASoC: use component probe/remove on ak4642 Kuninori Morimoto
                   ` (84 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:12 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak5386.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/ak5386.c b/sound/soc/codecs/ak5386.c
index 0ef2df2..2c9caf7 100644
--- a/sound/soc/codecs/ak5386.c
+++ b/sound/soc/codecs/ak5386.c
@@ -38,17 +38,18 @@ static const struct snd_soc_dapm_route ak5386_dapm_routes[] = {
 	{ "Capture", NULL, "AINR" },
 };
 
-static int ak5386_soc_probe(struct snd_soc_codec *codec)
+static int ak5386_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec);
 	return regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies);
 }
 
-static int ak5386_soc_remove(struct snd_soc_codec *codec)
+static void ak5386_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec);
 	regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -70,11 +71,11 @@ static int ak5386_soc_resume(struct snd_soc_codec *codec)
 #endif /* CONFIG_PM */
 
 static struct snd_soc_codec_driver soc_codec_ak5386 = {
-	.probe = ak5386_soc_probe,
-	.remove = ak5386_soc_remove,
 	.suspend = ak5386_soc_suspend,
 	.resume = ak5386_soc_resume,
 	.component_driver = {
+		.probe			= ak5386_soc_probe,
+		.remove			= ak5386_soc_remove,
 		.dapm_widgets		= ak5386_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(ak5386_dapm_widgets),
 		.dapm_routes		= ak5386_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 043/127] ASoC: use component probe/remove on ak4642
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (41 preceding siblings ...)
  2016-08-09  5:12 ` [PATCH 042/127] ASoC: use component probe/remove on ak5386 Kuninori Morimoto
@ 2016-08-09  5:13 ` Kuninori Morimoto
  2016-08-09  5:13 ` [PATCH 044/127] ASoC: use component probe/remove on ak4104 Kuninori Morimoto
                   ` (83 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:13 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak4642.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 2609f95..92924b5 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -540,8 +540,9 @@ static int ak4642_resume(struct snd_soc_codec *codec)
 	regcache_sync(regmap);
 	return 0;
 }
-static int ak4642_probe(struct snd_soc_codec *codec)
+static int ak4642_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak4642_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	if (priv->mcko)
@@ -551,11 +552,11 @@ static int ak4642_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ak4642 = {
-	.probe			= ak4642_probe,
 	.suspend		= ak4642_suspend,
 	.resume			= ak4642_resume,
 	.set_bias_level		= ak4642_set_bias_level,
 	.component_driver = {
+		.probe			= ak4642_probe,
 		.controls		= ak4642_snd_controls,
 		.num_controls		= ARRAY_SIZE(ak4642_snd_controls),
 		.dapm_widgets		= ak4642_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 044/127] ASoC: use component probe/remove on ak4104
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (42 preceding siblings ...)
  2016-08-09  5:13 ` [PATCH 043/127] ASoC: use component probe/remove on ak4642 Kuninori Morimoto
@ 2016-08-09  5:13 ` Kuninori Morimoto
  2016-08-09  5:14 ` [PATCH 045/127] ASoC: use component probe/remove on adau1701 Kuninori Morimoto
                   ` (82 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:13 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ak4104.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index bdca879..f4c915c 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -171,8 +171,9 @@ static struct snd_soc_dai_driver ak4104_dai = {
 	.ops = &ak4101_dai_ops,
 };
 
-static int ak4104_probe(struct snd_soc_codec *codec)
+static int ak4104_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak4104_private *ak4104 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -202,15 +203,14 @@ exit_disable_regulator:
 	return ret;
 }
 
-static int ak4104_remove(struct snd_soc_codec *codec)
+static void ak4104_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak4104_private *ak4104 = snd_soc_codec_get_drvdata(codec);
 
 	regmap_update_bits(ak4104->regmap, AK4104_REG_CONTROL1,
 			   AK4104_CONTROL1_PW | AK4104_CONTROL1_RSTN, 0);
 	regulator_disable(ak4104->regulator);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -240,12 +240,12 @@ static int ak4104_soc_resume(struct snd_soc_codec *codec)
 #endif /* CONFIG_PM */
 
 static struct snd_soc_codec_driver soc_codec_device_ak4104 = {
-	.probe = ak4104_probe,
-	.remove = ak4104_remove,
 	.suspend = ak4104_soc_suspend,
 	.resume = ak4104_soc_resume,
 
 	.component_driver = {
+		.probe			= ak4104_probe,
+		.remove			= ak4104_remove,
 		.dapm_widgets		= ak4104_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(ak4104_dapm_widgets),
 		.dapm_routes		= ak4104_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 045/127] ASoC: use component probe/remove on adau1701
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (43 preceding siblings ...)
  2016-08-09  5:13 ` [PATCH 044/127] ASoC: use component probe/remove on ak4104 Kuninori Morimoto
@ 2016-08-09  5:14 ` Kuninori Morimoto
  2016-08-09  5:15 ` [PATCH 046/127] ASoC: use component probe/remove on ac97 Kuninori Morimoto
                   ` (81 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adau1701.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 3bad1bc..f45c959 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -664,10 +664,11 @@ static const struct of_device_id adau1701_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, adau1701_dt_ids);
 #endif
 
-static int adau1701_probe(struct snd_soc_codec *codec)
+static int adau1701_probe(struct snd_soc_component *component)
 {
 	int i, ret;
 	unsigned int val;
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
 
 	ret = sigmadsp_attach(adau1701->sigmadsp, &codec->component);
@@ -715,16 +716,15 @@ exit_regulators_disable:
 	return ret;
 }
 
-static int adau1701_remove(struct snd_soc_codec *codec)
+static void adau1701_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
 
 	if (gpio_is_valid(adau1701->gpio_nreset))
 		gpio_set_value_cansleep(adau1701->gpio_nreset, 0);
 
 	regulator_bulk_disable(ARRAY_SIZE(adau1701->supplies), adau1701->supplies);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -758,14 +758,14 @@ static int adau1701_resume(struct snd_soc_codec *codec)
 #endif /* CONFIG_PM */
 
 static struct snd_soc_codec_driver adau1701_codec_drv = {
-	.probe			= adau1701_probe,
-	.remove			= adau1701_remove,
 	.resume			= adau1701_resume,
 	.suspend		= adau1701_suspend,
 	.set_bias_level		= adau1701_set_bias_level,
 	.idle_bias_off		= true,
 
 	.component_driver = {
+		.probe			= adau1701_probe,
+		.remove			= adau1701_remove,
 		.controls		= adau1701_controls,
 		.num_controls		= ARRAY_SIZE(adau1701_controls),
 		.dapm_widgets		= adau1701_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 046/127] ASoC: use component probe/remove on ac97
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (44 preceding siblings ...)
  2016-08-09  5:14 ` [PATCH 045/127] ASoC: use component probe/remove on adau1701 Kuninori Morimoto
@ 2016-08-09  5:15 ` Kuninori Morimoto
  2016-08-09  5:15 ` [PATCH 047/127] ASoC: use component probe/remove on atmel-classd Kuninori Morimoto
                   ` (80 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ac97.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index f7f04c6..a541c85 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -65,8 +65,9 @@ static struct snd_soc_dai_driver ac97_dai = {
 	.ops = &ac97_dai_ops,
 };
 
-static int ac97_soc_probe(struct snd_soc_codec *codec)
+static int ac97_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97;
 	struct snd_ac97_bus *ac97_bus;
 	struct snd_ac97_template ac97_template;
@@ -113,11 +114,11 @@ static int ac97_soc_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_ac97 = {
-	.probe = 	ac97_soc_probe,
 	.suspend =	ac97_soc_suspend,
 	.resume =	ac97_soc_resume,
 
 	.component_driver = {
+		.probe			= ac97_soc_probe,
 		.dapm_widgets		= ac97_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(ac97_widgets),
 		.dapm_routes		= ac97_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 047/127] ASoC: use component probe/remove on atmel-classd
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (45 preceding siblings ...)
  2016-08-09  5:15 ` [PATCH 046/127] ASoC: use component probe/remove on ac97 Kuninori Morimoto
@ 2016-08-09  5:15 ` Kuninori Morimoto
  2016-08-09  5:15 ` [PATCH 048/127] ASoC: use component probe/remove on atmel-pdmic Kuninori Morimoto
                   ` (79 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/atmel/atmel-classd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 89ac5f5..9d2888c 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -248,8 +248,9 @@ static const char * const pwm_type[] = {
 	"Single ended", "Differential"
 };
 
-static int atmel_classd_codec_probe(struct snd_soc_codec *codec)
+static int atmel_classd_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec);
 	struct atmel_classd *dd = snd_soc_card_get_drvdata(card);
 	const struct atmel_classd_pdata *pdata = dd->pdata;
@@ -307,9 +308,9 @@ static struct regmap *atmel_classd_codec_get_remap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_classd = {
-	.probe		= atmel_classd_codec_probe,
 	.get_regmap	= atmel_classd_codec_get_remap,
 	.component_driver = {
+		.probe			= atmel_classd_codec_probe,
 		.controls		= atmel_classd_snd_controls,
 		.num_controls		= ARRAY_SIZE(atmel_classd_snd_controls),
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 048/127] ASoC: use component probe/remove on atmel-pdmic
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (46 preceding siblings ...)
  2016-08-09  5:15 ` [PATCH 047/127] ASoC: use component probe/remove on atmel-classd Kuninori Morimoto
@ 2016-08-09  5:15 ` Kuninori Morimoto
  2016-08-09  5:16 ` [PATCH 049/127] ASoC: use component probe/remove on 88pm860x-codec Kuninori Morimoto
                   ` (78 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/atmel/atmel-pdmic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 2a3a41f..60cb267 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -344,8 +344,9 @@ SOC_SINGLE("High Pass Filter Switch", PDMIC_DSPR0,
 SOC_SINGLE("SINCC Filter Switch", PDMIC_DSPR0, PDMIC_DSPR0_SINBYP_SHIFT, 1, 1),
 };
 
-static int atmel_pdmic_codec_probe(struct snd_soc_codec *codec)
+static int atmel_pdmic_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec);
 	struct atmel_pdmic *dd = snd_soc_card_get_drvdata(card);
 
@@ -356,8 +357,8 @@ static int atmel_pdmic_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_pdmic = {
-	.probe		= atmel_pdmic_codec_probe,
 	.component_driver = {
+		.probe			= atmel_pdmic_codec_probe,
 		.controls		= atmel_pdmic_snd_controls,
 		.num_controls		= ARRAY_SIZE(atmel_pdmic_snd_controls),
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 049/127] ASoC: use component probe/remove on 88pm860x-codec
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (47 preceding siblings ...)
  2016-08-09  5:15 ` [PATCH 048/127] ASoC: use component probe/remove on atmel-pdmic Kuninori Morimoto
@ 2016-08-09  5:16 ` Kuninori Morimoto
  2016-08-09  5:16 ` [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec Kuninori Morimoto
                   ` (77 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/88pm860x-codec.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index b013a4c..686eb7d7 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1313,8 +1313,9 @@ int pm860x_mic_jack_detect(struct snd_soc_codec *codec,
 }
 EXPORT_SYMBOL_GPL(pm860x_mic_jack_detect);
 
-static int pm860x_probe(struct snd_soc_codec *codec)
+static int pm860x_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct pm860x_priv *pm860x = snd_soc_codec_get_drvdata(codec);
 	int i, ret;
 
@@ -1338,14 +1339,14 @@ out:
 	return ret;
 }
 
-static int pm860x_remove(struct snd_soc_codec *codec)
+static void pm860x_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct pm860x_priv *pm860x = snd_soc_codec_get_drvdata(codec);
 	int i;
 
 	for (i = 3; i >= 0; i--)
 		free_irq(pm860x->irq[i], pm860x);
-	return 0;
 }
 
 static struct regmap *pm860x_get_regmap(struct device *dev)
@@ -1356,12 +1357,12 @@ static struct regmap *pm860x_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_pm860x = {
-	.probe		= pm860x_probe,
-	.remove		= pm860x_remove,
 	.set_bias_level	= pm860x_set_bias_level,
 	.get_regmap	= pm860x_get_regmap,
 
 	.component_driver = {
+		.probe			= pm860x_probe,
+		.remove			= pm860x_remove,
 		.controls		= pm860x_snd_controls,
 		.num_controls		= ARRAY_SIZE(pm860x_snd_controls),
 		.dapm_widgets		= pm860x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (48 preceding siblings ...)
  2016-08-09  5:16 ` [PATCH 049/127] ASoC: use component probe/remove on 88pm860x-codec Kuninori Morimoto
@ 2016-08-09  5:16 ` Kuninori Morimoto
  2016-08-09  5:17 ` [PATCH 051/127] ASoC: use component probe/remove on ad1836 Kuninori Morimoto
                   ` (76 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ab8500-codec.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 3056487..4e4ede3 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2458,8 +2458,9 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np,
 	}
 }
 
-static int ab8500_codec_probe(struct snd_soc_codec *codec)
+static int ab8500_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct device *dev = codec->dev;
 	struct device_node *np = dev->of_node;
@@ -2524,8 +2525,8 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver ab8500_codec_driver = {
-	.probe =		ab8500_codec_probe,
 	.component_driver = {
+		.probe =		ab8500_codec_probe,
 		.controls =		ab8500_ctrls,
 		.num_controls =		ARRAY_SIZE(ab8500_ctrls),
 		.dapm_widgets =		ab8500_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 051/127] ASoC: use component probe/remove on ad1836
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (49 preceding siblings ...)
  2016-08-09  5:16 ` [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec Kuninori Morimoto
@ 2016-08-09  5:17 ` Kuninori Morimoto
  2016-08-09  5:17 ` [PATCH 052/127] ASoC: use component probe/remove on ad193x Kuninori Morimoto
                   ` (75 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ad1836.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index a478239..50daea3 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -248,8 +248,9 @@ static int ad1836_resume(struct snd_soc_codec *codec)
 #define ad1836_resume  NULL
 #endif
 
-static int ad1836_probe(struct snd_soc_codec *codec)
+static int ad1836_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	int num_dacs, num_adcs;
@@ -313,8 +314,9 @@ static int ad1836_probe(struct snd_soc_codec *codec)
 }
 
 /* power down chip */
-static int ad1836_remove(struct snd_soc_codec *codec)
+static int ad1836_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec);
 	/* reset clock control mode */
 	return regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2,
@@ -322,12 +324,12 @@ static int ad1836_remove(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ad1836 = {
-	.probe = ad1836_probe,
-	.remove = ad1836_remove,
 	.suspend = ad1836_suspend,
 	.resume = ad1836_resume,
 
 	.component_driver = {
+		.probe			= ad1836_probe,
+		.remove			= ad1836_remove,
 		.controls		= ad183x_controls,
 		.num_controls		= ARRAY_SIZE(ad183x_controls),
 		.dapm_widgets		= ad183x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 052/127] ASoC: use component probe/remove on ad193x
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (50 preceding siblings ...)
  2016-08-09  5:17 ` [PATCH 051/127] ASoC: use component probe/remove on ad1836 Kuninori Morimoto
@ 2016-08-09  5:17 ` Kuninori Morimoto
  2016-08-09  5:17 ` [PATCH 053/127] ASoC: use component probe/remove on ad1980 Kuninori Morimoto
                   ` (74 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ad193x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index d643557..62eae2f 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -351,8 +351,9 @@ static struct snd_soc_dai_driver ad193x_dai = {
 	.ops = &ad193x_dai_ops,
 };
 
-static int ad193x_codec_probe(struct snd_soc_codec *codec)
+static int ad193x_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	int num, ret;
@@ -409,8 +410,8 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
-	.probe = ad193x_codec_probe,
 	.component_driver = {
+		.probe			= ad193x_codec_probe,
 		.controls		= ad193x_snd_controls,
 		.num_controls		= ARRAY_SIZE(ad193x_snd_controls),
 		.dapm_widgets		= ad193x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 053/127] ASoC: use component probe/remove on ad1980
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (51 preceding siblings ...)
  2016-08-09  5:17 ` [PATCH 052/127] ASoC: use component probe/remove on ad193x Kuninori Morimoto
@ 2016-08-09  5:17 ` Kuninori Morimoto
  2016-08-09  5:18 ` [PATCH 054/127] ASoC: use component probe/remove on adau1373 Kuninori Morimoto
                   ` (73 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ad1980.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index b7c1b9f..795294b 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -232,8 +232,9 @@ static int ad1980_reset(struct snd_soc_codec *codec, int try_warm)
 	return -EIO;
 }
 
-static int ad1980_soc_probe(struct snd_soc_codec *codec)
+static int ad1980_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97;
 	struct regmap *regmap;
 	int ret;
@@ -286,8 +287,9 @@ err_free_ac97:
 	return ret;
 }
 
-static int ad1980_soc_remove(struct snd_soc_codec *codec)
+static int ad1980_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_codec_exit_regmap(codec);
@@ -296,10 +298,9 @@ static int ad1980_soc_remove(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ad1980 = {
-	.probe = 	ad1980_soc_probe,
-	.remove = 	ad1980_soc_remove,
-
 	.component_driver = {
+		.probe			= ad1980_soc_probe,
+		.remove			= ad1980_soc_remove,
 		.controls		= ad1980_snd_ac97_controls,
 		.num_controls		= ARRAY_SIZE(ad1980_snd_ac97_controls),
 		.dapm_widgets		= ad1980_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 054/127] ASoC: use component probe/remove on adau1373
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (52 preceding siblings ...)
  2016-08-09  5:17 ` [PATCH 053/127] ASoC: use component probe/remove on ad1980 Kuninori Morimoto
@ 2016-08-09  5:18 ` Kuninori Morimoto
  2016-08-09  5:18 ` [PATCH 055/127] ASoC: use component probe/remove on adau1761 Kuninori Morimoto
                   ` (72 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adau1373.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index 8fa9045..6056948 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1348,8 +1348,9 @@ static bool adau1373_valid_micbias(enum adau1373_micbias_voltage micbias)
 	return false;
 }
 
-static int adau1373_probe(struct snd_soc_codec *codec)
+static int adau1373_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec);
 	struct adau1373_platform_data *pdata = codec->dev->platform_data;
 	bool lineout_differential = false;
@@ -1459,7 +1460,6 @@ static const struct regmap_config adau1373_regmap_config = {
 };
 
 static struct snd_soc_codec_driver adau1373_codec_driver = {
-	.probe =	adau1373_probe,
 	.resume =	adau1373_resume,
 	.set_bias_level = adau1373_set_bias_level,
 	.idle_bias_off = true,
@@ -1467,6 +1467,7 @@ static struct snd_soc_codec_driver adau1373_codec_driver = {
 	.set_pll = adau1373_set_pll,
 
 	.component_driver = {
+		.probe			= adau1373_probe,
 		.controls		= adau1373_controls,
 		.num_controls		= ARRAY_SIZE(adau1373_controls),
 		.dapm_widgets		= adau1373_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 055/127] ASoC: use component probe/remove on adau1761
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (53 preceding siblings ...)
  2016-08-09  5:18 ` [PATCH 054/127] ASoC: use component probe/remove on adau1373 Kuninori Morimoto
@ 2016-08-09  5:18 ` Kuninori Morimoto
  2016-08-09  5:19 ` [PATCH 056/127] ASoC: use component probe/remove on adau1781 Kuninori Morimoto
                   ` (71 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adau1761.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adau1761.c b/sound/soc/codecs/adau1761.c
index 3bc3cc5..f787dcc 100644
--- a/sound/soc/codecs/adau1761.c
+++ b/sound/soc/codecs/adau1761.c
@@ -640,8 +640,9 @@ static bool adau1761_readable_register(struct device *dev, unsigned int reg)
 	return adau17x1_readable_register(dev, reg);
 }
 
-static int adau1761_codec_probe(struct snd_soc_codec *codec)
+static int adau1761_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct adau1761_platform_data *pdata = codec->dev->platform_data;
 	struct adau *adau = snd_soc_codec_get_drvdata(codec);
@@ -714,12 +715,12 @@ static int adau1761_codec_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver adau1761_codec_driver = {
-	.probe = adau1761_codec_probe,
 	.resume	= adau17x1_resume,
 	.set_bias_level	= adau1761_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= adau1761_codec_probe,
 		.controls		= adau1761_controls,
 		.num_controls		= ARRAY_SIZE(adau1761_controls),
 		.dapm_widgets		= adau1x61_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 056/127] ASoC: use component probe/remove on adau1781
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (54 preceding siblings ...)
  2016-08-09  5:18 ` [PATCH 055/127] ASoC: use component probe/remove on adau1761 Kuninori Morimoto
@ 2016-08-09  5:19 ` Kuninori Morimoto
  2016-08-09  5:19 ` [PATCH 057/127] ASoC: use component probe/remove on adau1977 Kuninori Morimoto
                   ` (70 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:19 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adau1781.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adau1781.c b/sound/soc/codecs/adau1781.c
index 546071c..89c3c3e 100644
--- a/sound/soc/codecs/adau1781.c
+++ b/sound/soc/codecs/adau1781.c
@@ -380,8 +380,9 @@ static int adau1781_set_input_mode(struct adau *adau, unsigned int reg,
 		ADAU1781_INPUT_DIFFERNTIAL, val);
 }
 
-static int adau1781_codec_probe(struct snd_soc_codec *codec)
+static int adau1781_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct adau1781_platform_data *pdata = dev_get_platdata(codec->dev);
 	struct adau *adau = snd_soc_codec_get_drvdata(codec);
@@ -427,12 +428,12 @@ static int adau1781_codec_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver adau1781_codec_driver = {
-	.probe = adau1781_codec_probe,
 	.resume = adau17x1_resume,
 	.set_bias_level = adau1781_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= adau1781_codec_probe,
 		.controls		= adau1781_controls,
 		.num_controls		= ARRAY_SIZE(adau1781_controls),
 		.dapm_widgets		= adau1781_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 057/127] ASoC: use component probe/remove on adau1977
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (55 preceding siblings ...)
  2016-08-09  5:19 ` [PATCH 056/127] ASoC: use component probe/remove on adau1781 Kuninori Morimoto
@ 2016-08-09  5:19 ` Kuninori Morimoto
  2016-08-09  5:19 ` [PATCH 058/127] ASoC: use component probe/remove on adav80x Kuninori Morimoto
                   ` (69 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:19 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adau1977.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index b319db6..cf7ae64 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -846,8 +846,9 @@ static int adau1977_set_sysclk(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int adau1977_codec_probe(struct snd_soc_codec *codec)
+static int adau1977_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct adau1977 *adau1977 = snd_soc_codec_get_drvdata(codec);
 	int ret;
@@ -868,12 +869,12 @@ static int adau1977_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver adau1977_codec_driver = {
-	.probe = adau1977_codec_probe,
 	.set_bias_level = adau1977_set_bias_level,
 	.set_sysclk = adau1977_set_sysclk,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= adau1977_codec_probe,
 		.controls		= adau1977_snd_controls,
 		.num_controls		= ARRAY_SIZE(adau1977_snd_controls),
 		.dapm_widgets		= adau1977_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 058/127] ASoC: use component probe/remove on adav80x
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (56 preceding siblings ...)
  2016-08-09  5:19 ` [PATCH 057/127] ASoC: use component probe/remove on adau1977 Kuninori Morimoto
@ 2016-08-09  5:19 ` Kuninori Morimoto
  2016-08-09  5:20 ` [PATCH 059/127] ASoC: use component probe/remove on alc5632 Kuninori Morimoto
                   ` (68 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:19 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/adav80x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 6e793eb..42a5589 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -799,8 +799,9 @@ static struct snd_soc_dai_driver adav80x_dais[] = {
 	},
 };
 
-static int adav80x_probe(struct snd_soc_codec *codec)
+static int adav80x_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
 
@@ -826,7 +827,6 @@ static int adav80x_resume(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver adav80x_codec_driver = {
-	.probe = adav80x_probe,
 	.resume = adav80x_resume,
 	.set_bias_level = adav80x_set_bias_level,
 	.suspend_bias_off = true,
@@ -835,6 +835,7 @@ static struct snd_soc_codec_driver adav80x_codec_driver = {
 	.set_sysclk = adav80x_set_sysclk,
 
 	.component_driver = {
+		.probe			= adav80x_probe,
 		.controls		= adav80x_controls,
 		.num_controls		= ARRAY_SIZE(adav80x_controls),
 		.dapm_widgets		= adav80x_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 059/127] ASoC: use component probe/remove on alc5632
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (57 preceding siblings ...)
  2016-08-09  5:19 ` [PATCH 058/127] ASoC: use component probe/remove on adav80x Kuninori Morimoto
@ 2016-08-09  5:20 ` Kuninori Morimoto
  2016-08-09  5:21 ` [PATCH 060/127] ASoC: use component probe/remove on cs47l24 Kuninori Morimoto
                   ` (67 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:20 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/alc5632.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index adb80d8..7ead9bc 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -1050,8 +1050,9 @@ static int alc5632_resume(struct snd_soc_codec *codec)
 #define	alc5632_resume	NULL
 #endif
 
-static int alc5632_probe(struct snd_soc_codec *codec)
+static int alc5632_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
 
 	switch (alc5632->id) {
@@ -1067,12 +1068,12 @@ static int alc5632_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver soc_codec_device_alc5632 = {
-	.probe = alc5632_probe,
 	.resume = alc5632_resume,
 	.set_bias_level = alc5632_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= alc5632_probe,
 		.controls		= alc5632_snd_controls,
 		.num_controls		= ARRAY_SIZE(alc5632_snd_controls),
 		.dapm_widgets		= alc5632_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 060/127] ASoC: use component probe/remove on cs47l24
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (58 preceding siblings ...)
  2016-08-09  5:20 ` [PATCH 059/127] ASoC: use component probe/remove on alc5632 Kuninori Morimoto
@ 2016-08-09  5:21 ` Kuninori Morimoto
  2016-08-09  5:21 ` [PATCH 061/127] ASoC: use component probe/remove on cx20442 Kuninori Morimoto
                   ` (66 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:21 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cs47l24.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c
index 779a7bf..8eeb746 100644
--- a/sound/soc/codecs/cs47l24.c
+++ b/sound/soc/codecs/cs47l24.c
@@ -1102,8 +1102,9 @@ static irqreturn_t cs47l24_adsp2_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int cs47l24_codec_probe(struct snd_soc_codec *codec)
+static int cs47l24_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct cs47l24_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct arizona *arizona = priv->core.arizona;
@@ -1148,8 +1149,9 @@ err_adsp2_codec_probe:
 	return ret;
 }
 
-static int cs47l24_codec_remove(struct snd_soc_codec *codec)
+static void cs47l24_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cs47l24_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct arizona *arizona = priv->core.arizona;
 
@@ -1161,8 +1163,6 @@ static int cs47l24_codec_remove(struct snd_soc_codec *codec)
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
 
 	arizona_free_spk(codec);
-
-	return 0;
 }
 
 #define CS47L24_DIG_VU 0x0200
@@ -1181,8 +1181,6 @@ static struct regmap *cs47l24_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_cs47l24 = {
-	.probe = cs47l24_codec_probe,
-	.remove = cs47l24_codec_remove,
 	.get_regmap = cs47l24_get_regmap,
 
 	.idle_bias_off = true,
@@ -1191,6 +1189,8 @@ static struct snd_soc_codec_driver soc_codec_dev_cs47l24 = {
 	.set_pll = cs47l24_set_fll,
 
 	.component_driver = {
+		.probe			= cs47l24_codec_probe,
+		.remove			= cs47l24_codec_remove,
 		.controls		= cs47l24_snd_controls,
 		.num_controls		= ARRAY_SIZE(cs47l24_snd_controls),
 		.dapm_widgets		= cs47l24_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 061/127] ASoC: use component probe/remove on cx20442
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (59 preceding siblings ...)
  2016-08-09  5:21 ` [PATCH 060/127] ASoC: use component probe/remove on cs47l24 Kuninori Morimoto
@ 2016-08-09  5:21 ` Kuninori Morimoto
  2016-08-09  5:21 ` [PATCH 062/127] ASoC: use component probe/remove on da7210 Kuninori Morimoto
                   ` (65 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:21 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/cx20442.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index 2c12471..191d109 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -356,8 +356,9 @@ static int cx20442_set_bias_level(struct snd_soc_codec *codec,
 	return err;
 }
 
-static int cx20442_codec_probe(struct snd_soc_codec *codec)
+static int cx20442_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cx20442_priv *cx20442;
 
 	cx20442 = kzalloc(sizeof(struct cx20442_priv), GFP_KERNEL);
@@ -377,8 +378,9 @@ static int cx20442_codec_probe(struct snd_soc_codec *codec)
 }
 
 /* power down chip */
-static int cx20442_codec_remove(struct snd_soc_codec *codec)
+static void cx20442_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec);
 
 	if (cx20442->control_data) {
@@ -393,14 +395,11 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)
 
 	snd_soc_codec_set_drvdata(codec, NULL);
 	kfree(cx20442);
-	return 0;
 }
 
 static const u8 cx20442_reg;
 
 static struct snd_soc_codec_driver cx20442_codec_dev = {
-	.probe = 	cx20442_codec_probe,
-	.remove = 	cx20442_codec_remove,
 	.set_bias_level = cx20442_set_bias_level,
 	.reg_cache_default = &cx20442_reg,
 	.reg_cache_size = 1,
@@ -408,6 +407,8 @@ static struct snd_soc_codec_driver cx20442_codec_dev = {
 	.read = cx20442_read_reg_cache,
 	.write = cx20442_write,
 	.component_driver = {
+		.probe			= cx20442_codec_probe,
+		.remove			= cx20442_codec_remove,
 		.dapm_widgets		= cx20442_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(cx20442_dapm_widgets),
 		.dapm_routes		= cx20442_audio_map,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 062/127] ASoC: use component probe/remove on da7210
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (60 preceding siblings ...)
  2016-08-09  5:21 ` [PATCH 061/127] ASoC: use component probe/remove on cx20442 Kuninori Morimoto
@ 2016-08-09  5:21 ` Kuninori Morimoto
  2016-08-09  5:22 ` [PATCH 063/127] ASoC: use component probe/remove on da7213 Kuninori Morimoto
                   ` (64 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:21 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/da7210.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 17053df..e8bc0d6 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1064,8 +1064,9 @@ static struct snd_soc_dai_driver da7210_dai = {
 	.symmetric_rates = 1,
 };
 
-static int da7210_probe(struct snd_soc_codec *codec)
+static int da7210_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7210_priv *da7210 = snd_soc_codec_get_drvdata(codec);
 
 	dev_info(codec->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION);
@@ -1165,9 +1166,8 @@ static int da7210_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_da7210 = {
-	.probe			= da7210_probe,
-
 	.component_driver = {
+		.probe			= da7210_probe,
 		.controls		= da7210_snd_controls,
 		.num_controls		= ARRAY_SIZE(da7210_snd_controls),
 		.dapm_widgets		= da7210_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 063/127] ASoC: use component probe/remove on da7213
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (61 preceding siblings ...)
  2016-08-09  5:21 ` [PATCH 062/127] ASoC: use component probe/remove on da7210 Kuninori Morimoto
@ 2016-08-09  5:22 ` Kuninori Morimoto
  2016-08-09  5:22 ` [PATCH 064/127] ASoC: use component probe/remove on wm9713 Kuninori Morimoto
                   ` (63 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/da7213.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 7cfb5da..7e4f642 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -1596,8 +1596,9 @@ static struct da7213_platform_data
 }
 
 
-static int da7213_probe(struct snd_soc_codec *codec)
+static int da7213_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec);
 
 	/* Default to using ALC auto offset calibration mode. */
@@ -1737,10 +1738,10 @@ static int da7213_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_da7213 = {
-	.probe			= da7213_probe,
 	.set_bias_level		= da7213_set_bias_level,
 
 	.component_driver = {
+		.probe			= da7213_probe,
 		.controls		= da7213_snd_controls,
 		.num_controls		= ARRAY_SIZE(da7213_snd_controls),
 		.dapm_widgets		= da7213_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 064/127] ASoC: use component probe/remove on wm9713
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (62 preceding siblings ...)
  2016-08-09  5:22 ` [PATCH 063/127] ASoC: use component probe/remove on da7213 Kuninori Morimoto
@ 2016-08-09  5:22 ` Kuninori Morimoto
  2016-08-09  5:22 ` [PATCH 065/127] ASoC: use component probe/remove on wm9712 Kuninori Morimoto
                   ` (62 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm9713.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 255a7c2..50b1156 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -1202,8 +1202,9 @@ static int wm9713_soc_resume(struct snd_soc_codec *codec)
 	return ret;
 }
 
-static int wm9713_soc_probe(struct snd_soc_codec *codec)
+static int wm9713_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
 	struct regmap *regmap;
 
@@ -1226,23 +1227,23 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm9713_soc_remove(struct snd_soc_codec *codec)
+static void wm9713_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_codec_exit_regmap(codec);
 	snd_soc_free_ac97_codec(wm9713->ac97);
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm9713 = {
-	.probe = 	wm9713_soc_probe,
-	.remove = 	wm9713_soc_remove,
 	.suspend =	wm9713_soc_suspend,
 	.resume = 	wm9713_soc_resume,
 	.set_bias_level = wm9713_set_bias_level,
 
 	.component_driver = {
+		.probe			= wm9713_soc_probe,
+		.remove			= wm9713_soc_remove,
 		.controls		= wm9713_snd_ac97_controls,
 		.num_controls		= ARRAY_SIZE(wm9713_snd_ac97_controls),
 		.dapm_widgets		= wm9713_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 065/127] ASoC: use component probe/remove on wm9712
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (63 preceding siblings ...)
  2016-08-09  5:22 ` [PATCH 064/127] ASoC: use component probe/remove on wm9713 Kuninori Morimoto
@ 2016-08-09  5:22 ` Kuninori Morimoto
  2016-08-09  5:23 ` [PATCH 066/127] ASoC: use component probe/remove on wm9705 Kuninori Morimoto
                   ` (61 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm9712.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index e5aafdd..d7d504a 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -642,8 +642,9 @@ static int wm9712_soc_resume(struct snd_soc_codec *codec)
 	return ret;
 }
 
-static int wm9712_soc_probe(struct snd_soc_codec *codec)
+static int wm9712_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -661,17 +662,15 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm9712_soc_remove(struct snd_soc_codec *codec)
+static void wm9712_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_free_ac97_codec(wm9712->ac97);
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm9712 = {
-	.probe = 	wm9712_soc_probe,
-	.remove = 	wm9712_soc_remove,
 	.resume =	wm9712_soc_resume,
 	.read = ac97_read,
 	.write = ac97_write,
@@ -683,6 +682,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = {
 	.reg_cache_default = wm9712_reg,
 
 	.component_driver = {
+		.probe			= wm9712_soc_probe,
+		.remove			= wm9712_soc_remove,
 		.controls		= wm9712_snd_ac97_controls,
 		.num_controls		= ARRAY_SIZE(wm9712_snd_ac97_controls),
 		.dapm_widgets		= wm9712_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 066/127] ASoC: use component probe/remove on wm9705
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (64 preceding siblings ...)
  2016-08-09  5:22 ` [PATCH 065/127] ASoC: use component probe/remove on wm9712 Kuninori Morimoto
@ 2016-08-09  5:23 ` Kuninori Morimoto
  2016-08-09  5:23 ` [PATCH 067/127] ASoC: use component probe/remove on wm9090 Kuninori Morimoto
                   ` (60 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm9705.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index c88492d..928b51d 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -328,8 +328,9 @@ static int wm9705_soc_resume(struct snd_soc_codec *codec)
 #define wm9705_soc_resume NULL
 #endif
 
-static int wm9705_soc_probe(struct snd_soc_codec *codec)
+static int wm9705_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97;
 
 	ac97 = snd_soc_new_ac97_codec(codec, WM9705_VENDOR_ID,
@@ -344,17 +345,15 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm9705_soc_remove(struct snd_soc_codec *codec)
+static void wm9705_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_free_ac97_codec(ac97);
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm9705 = {
-	.probe = 	wm9705_soc_probe,
-	.remove = 	wm9705_soc_remove,
 	.suspend =	wm9705_soc_suspend,
 	.resume =	wm9705_soc_resume,
 	.read = ac97_read,
@@ -365,6 +364,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9705 = {
 	.reg_cache_default = wm9705_reg,
 
 	.component_driver = {
+		.probe			= wm9705_soc_probe,
+		.remove			= wm9705_soc_remove,
 		.controls		= wm9705_snd_ac97_controls,
 		.num_controls		= ARRAY_SIZE(wm9705_snd_ac97_controls),
 		.dapm_widgets		= wm9705_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 067/127] ASoC: use component probe/remove on wm9090
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (65 preceding siblings ...)
  2016-08-09  5:23 ` [PATCH 066/127] ASoC: use component probe/remove on wm9705 Kuninori Morimoto
@ 2016-08-09  5:23 ` Kuninori Morimoto
  2016-08-09  5:23 ` [PATCH 068/127] ASoC: use component probe/remove on wm9081 Kuninori Morimoto
                   ` (59 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm9090.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c
index 5d73729..511bd7e 100644
--- a/sound/soc/codecs/wm9090.c
+++ b/sound/soc/codecs/wm9090.c
@@ -515,8 +515,10 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int wm9090_probe(struct snd_soc_codec *codec)
+static int wm9090_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	/* Configure some defaults; they will be written out when we
 	 * bring the bias up.
 	 */
@@ -551,9 +553,11 @@ static int wm9090_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm9090 = {
-	.probe = 	wm9090_probe,
 	.set_bias_level = wm9090_set_bias_level,
 	.suspend_bias_off = true,
+	.component_driver = {
+		.probe			= wm9090_probe,
+	},
 };
 
 static const struct regmap_config wm9090_regmap = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 068/127] ASoC: use component probe/remove on wm9081
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (66 preceding siblings ...)
  2016-08-09  5:23 ` [PATCH 067/127] ASoC: use component probe/remove on wm9090 Kuninori Morimoto
@ 2016-08-09  5:23 ` Kuninori Morimoto
  2016-08-09  5:24 ` [PATCH 069/127] ASoC: use component probe/remove on wm8998 Kuninori Morimoto
                   ` (58 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm9081.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 30eaf4c..a532012 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1254,8 +1254,9 @@ static struct snd_soc_dai_driver wm9081_dai = {
 	.ops = &wm9081_dai_ops,
 };
 
-static int wm9081_probe(struct snd_soc_codec *codec)
+static int wm9081_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec);
 
 	/* Enable zero cross by default */
@@ -1275,14 +1276,13 @@ static int wm9081_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
-	.probe = 	wm9081_probe,
-
 	.set_sysclk = wm9081_set_sysclk,
 	.set_bias_level = wm9081_set_bias_level,
 
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm9081_probe,
 		.controls		= wm9081_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm9081_snd_controls),
 		.dapm_widgets		= wm9081_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 069/127] ASoC: use component probe/remove on wm8998
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (67 preceding siblings ...)
  2016-08-09  5:23 ` [PATCH 068/127] ASoC: use component probe/remove on wm9081 Kuninori Morimoto
@ 2016-08-09  5:24 ` Kuninori Morimoto
  2016-08-09  5:24 ` [PATCH 070/127] ASoC: use component probe/remove on wm8997 Kuninori Morimoto
                   ` (57 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8998.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index 315b23b..657b593 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1304,8 +1304,9 @@ static int wm8998_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
 	}
 }
 
-static int wm8998_codec_probe(struct snd_soc_codec *codec)
+static int wm8998_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -1319,15 +1320,14 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8998_codec_remove(struct snd_soc_codec *codec)
+static void wm8998_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	priv->core.arizona->dapm = NULL;
 
 	arizona_free_spk(codec);
-
-	return 0;
 }
 
 #define WM8998_DIG_VU 0x0200
@@ -1352,8 +1352,6 @@ static struct regmap *wm8998_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8998 = {
-	.probe = wm8998_codec_probe,
-	.remove = wm8998_codec_remove,
 	.get_regmap = wm8998_get_regmap,
 
 	.idle_bias_off = true,
@@ -1362,6 +1360,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8998 = {
 	.set_pll = wm8998_set_fll,
 
 	.component_driver = {
+		.probe			= wm8998_codec_probe,
+		.remove			= wm8998_codec_remove,
 		.controls		= wm8998_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8998_snd_controls),
 		.dapm_widgets		= wm8998_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 070/127] ASoC: use component probe/remove on wm8997
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (68 preceding siblings ...)
  2016-08-09  5:24 ` [PATCH 069/127] ASoC: use component probe/remove on wm8998 Kuninori Morimoto
@ 2016-08-09  5:24 ` Kuninori Morimoto
  2016-08-09  5:25 ` [PATCH 071/127] ASoC: use component probe/remove on wm8996 Kuninori Morimoto
                   ` (56 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8997.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index cf23a6b..acdb6e2 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1052,8 +1052,9 @@ static struct snd_soc_dai_driver wm8997_dai[] = {
 	},
 };
 
-static int wm8997_codec_probe(struct snd_soc_codec *codec)
+static int wm8997_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec);
 
@@ -1066,15 +1067,14 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8997_codec_remove(struct snd_soc_codec *codec)
+static void wm8997_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	priv->core.arizona->dapm = NULL;
 
 	arizona_free_spk(codec);
-
-	return 0;
 }
 
 #define WM8997_DIG_VU 0x0200
@@ -1096,8 +1096,6 @@ static struct regmap *wm8997_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8997 = {
-	.probe = wm8997_codec_probe,
-	.remove = wm8997_codec_remove,
 	.get_regmap =   wm8997_get_regmap,
 
 	.idle_bias_off = true,
@@ -1106,6 +1104,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8997 = {
 	.set_pll = wm8997_set_fll,
 
 	.component_driver = {
+		.probe			= wm8997_codec_probe,
+		.remove			= wm8997_codec_remove,
 		.controls		= wm8997_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8997_snd_controls),
 		.dapm_widgets		= wm8997_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 071/127] ASoC: use component probe/remove on wm8996
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (69 preceding siblings ...)
  2016-08-09  5:24 ` [PATCH 070/127] ASoC: use component probe/remove on wm8997 Kuninori Morimoto
@ 2016-08-09  5:25 ` Kuninori Morimoto
  2016-08-09  5:25 ` [PATCH 072/127] ASoC: use component probe/remove on wm8995 Kuninori Morimoto
                   ` (55 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8996.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index abacf6c..43e01bb 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -2614,9 +2614,10 @@ static const struct regmap_config wm8996_regmap = {
 	.cache_type = REGCACHE_RBTREE,
 };
 
-static int wm8996_probe(struct snd_soc_codec *codec)
+static int wm8996_probe(struct snd_soc_component *component)
 {
 	int ret;
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
 	struct i2c_client *i2c = to_i2c_client(codec->dev);
 	int irq_flags;
@@ -2671,8 +2672,9 @@ static int wm8996_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8996_remove(struct snd_soc_codec *codec)
+static void wm8996_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct i2c_client *i2c = to_i2c_client(codec->dev);
 
 	snd_soc_update_bits(codec, WM8996_INTERRUPT_CONTROL,
@@ -2680,17 +2682,15 @@ static int wm8996_remove(struct snd_soc_codec *codec)
 
 	if (i2c->irq)
 		free_irq(i2c->irq, codec);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8996 = {
-	.probe =	wm8996_probe,
-	.remove =	wm8996_remove,
 	.set_bias_level = wm8996_set_bias_level,
 	.idle_bias_off	= true,
 	.seq_notifier = wm8996_seq_notifier,
 	.component_driver = {
+		.probe			= wm8996_probe,
+		.remove			= wm8996_remove,
 		.controls		= wm8996_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8996_snd_controls),
 		.dapm_widgets		= wm8996_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 072/127] ASoC: use component probe/remove on wm8995
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (70 preceding siblings ...)
  2016-08-09  5:25 ` [PATCH 071/127] ASoC: use component probe/remove on wm8996 Kuninori Morimoto
@ 2016-08-09  5:25 ` Kuninori Morimoto
  2016-08-09  5:25 ` [PATCH 073/127] ASoC: use component probe/remove on wm8994 Kuninori Morimoto
                   ` (54 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8995.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 19b08a5..15be86c 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -1994,8 +1994,9 @@ static int wm8995_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int wm8995_remove(struct snd_soc_codec *codec)
+static void wm8995_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8995_priv *wm8995;
 	int i;
 
@@ -2006,11 +2007,11 @@ static int wm8995_remove(struct snd_soc_codec *codec)
 					      &wm8995->disable_nb[i]);
 
 	regulator_bulk_free(ARRAY_SIZE(wm8995->supplies), wm8995->supplies);
-	return 0;
 }
 
-static int wm8995_probe(struct snd_soc_codec *codec)
+static int wm8995_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8995_priv *wm8995;
 	int i;
 	int ret;
@@ -2187,12 +2188,12 @@ static struct snd_soc_dai_driver wm8995_dai[] = {
 };
 
 static const struct snd_soc_codec_driver soc_codec_dev_wm8995 = {
-	.probe = wm8995_probe,
-	.remove = wm8995_remove,
 	.set_bias_level = wm8995_set_bias_level,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8995_probe,
+		.remove			= wm8995_remove,
 		.controls		= wm8995_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8995_snd_controls),
 		.dapm_widgets		= wm8995_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 073/127] ASoC: use component probe/remove on wm8994
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (71 preceding siblings ...)
  2016-08-09  5:25 ` [PATCH 072/127] ASoC: use component probe/remove on wm8995 Kuninori Morimoto
@ 2016-08-09  5:25 ` Kuninori Morimoto
  2016-08-09  5:26 ` [PATCH 074/127] ASoC: use component probe/remove on wm8993 Kuninori Morimoto
                   ` (53 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8994.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index a18aecb..620588e 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3983,8 +3983,9 @@ static irqreturn_t wm8994_temp_shut(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int wm8994_codec_probe(struct snd_soc_codec *codec)
+static int wm8994_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct wm8994 *control = dev_get_drvdata(codec->dev->parent);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
@@ -4388,8 +4389,9 @@ err_irq:
 	return ret;
 }
 
-static int wm8994_codec_remove(struct snd_soc_codec *codec)
+static void wm8994_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 	struct wm8994 *control = wm8994->wm8994;
 	int i;
@@ -4429,7 +4431,6 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
 	release_firmware(wm8994->mbc_vss);
 	release_firmware(wm8994->enh_eq);
 	kfree(wm8994->retune_mobile_texts);
-	return 0;
 }
 
 static struct regmap *wm8994_get_regmap(struct device *dev)
@@ -4440,12 +4441,14 @@ static struct regmap *wm8994_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8994 = {
-	.probe =	wm8994_codec_probe,
-	.remove =	wm8994_codec_remove,
 	.suspend =	wm8994_codec_suspend,
 	.resume =	wm8994_codec_resume,
 	.get_regmap =   wm8994_get_regmap,
 	.set_bias_level = wm8994_set_bias_level,
+	.component_driver = {
+		.probe			= wm8994_codec_probe,
+		.remove			= wm8994_codec_remove,
+	},
 };
 
 static int wm8994_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 074/127] ASoC: use component probe/remove on wm8993
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (72 preceding siblings ...)
  2016-08-09  5:25 ` [PATCH 073/127] ASoC: use component probe/remove on wm8994 Kuninori Morimoto
@ 2016-08-09  5:26 ` Kuninori Morimoto
  2016-08-09  5:26 ` [PATCH 075/127] ASoC: use component probe/remove on wm8990 Kuninori Morimoto
                   ` (52 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8993.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 8668c4c..6da4fb7 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1479,8 +1479,9 @@ static struct snd_soc_dai_driver wm8993_dai = {
 	.symmetric_rates = 1,
 };
 
-static int wm8993_probe(struct snd_soc_codec *codec)
+static int wm8993_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -1614,10 +1615,12 @@ static const struct regmap_config wm8993_regmap = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8993 = {
-	.probe = 	wm8993_probe,
 	.suspend =	wm8993_suspend,
 	.resume =	wm8993_resume,
 	.set_bias_level = wm8993_set_bias_level,
+	.component_driver = {
+		.probe			= wm8993_probe,
+	},
 };
 
 static int wm8993_i2c_probe(struct i2c_client *i2c,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 075/127] ASoC: use component probe/remove on wm8990
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (73 preceding siblings ...)
  2016-08-09  5:26 ` [PATCH 074/127] ASoC: use component probe/remove on wm8993 Kuninori Morimoto
@ 2016-08-09  5:26 ` Kuninori Morimoto
  2016-08-09  5:27 ` [PATCH 076/127] ASoC: use component probe/remove on wm8988 Kuninori Morimoto
                   ` (51 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8990.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index a412fd0..6c649ba 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1272,8 +1272,10 @@ static struct snd_soc_dai_driver wm8990_dai = {
  * initialise the WM8990 driver
  * register the mixer and dsp interfaces with the kernel
  */
-static int wm8990_probe(struct snd_soc_codec *codec)
+static int wm8990_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	wm8990_reset(codec);
 
 	/* charge output caps */
@@ -1295,11 +1297,11 @@ static int wm8990_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8990 = {
-	.probe =	wm8990_probe,
 	.set_bias_level = wm8990_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8990_probe,
 		.controls		= wm8990_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8990_snd_controls),
 		.dapm_widgets		= wm8990_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 076/127] ASoC: use component probe/remove on wm8988
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (74 preceding siblings ...)
  2016-08-09  5:26 ` [PATCH 075/127] ASoC: use component probe/remove on wm8990 Kuninori Morimoto
@ 2016-08-09  5:27 ` Kuninori Morimoto
  2016-08-09  5:27 ` [PATCH 077/127] ASoC: use component probe/remove on wm8983 Kuninori Morimoto
                   ` (50 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8988.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index b0d0219..2203930 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -792,8 +792,9 @@ static struct snd_soc_dai_driver wm8988_dai = {
 	.symmetric_rates = 1,
 };
 
-static int wm8988_probe(struct snd_soc_codec *codec)
+static int wm8988_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret = 0;
 
 	ret = wm8988_reset(codec);
@@ -813,11 +814,11 @@ static int wm8988_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver soc_codec_dev_wm8988 = {
-	.probe =	wm8988_probe,
 	.set_bias_level = wm8988_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8988_probe,
 		.controls		= wm8988_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8988_snd_controls),
 		.dapm_widgets		= wm8988_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 077/127] ASoC: use component probe/remove on wm8983
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (75 preceding siblings ...)
  2016-08-09  5:27 ` [PATCH 076/127] ASoC: use component probe/remove on wm8988 Kuninori Morimoto
@ 2016-08-09  5:27 ` Kuninori Morimoto
  2016-08-09  5:27 ` [PATCH 078/127] ASoC: use component probe/remove on wm8971 Kuninori Morimoto
                   ` (49 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8983.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index 9609fc0..7d816e2 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -913,8 +913,9 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int wm8983_probe(struct snd_soc_codec *codec)
+static int wm8983_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret;
 	int i;
 
@@ -977,10 +978,10 @@ static struct snd_soc_dai_driver wm8983_dai = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8983 = {
-	.probe = wm8983_probe,
 	.set_bias_level = wm8983_set_bias_level,
 	.suspend_bias_off = true,
 	.component_driver = {
+		.probe			= wm8983_probe,
 		.controls		= wm8983_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8983_snd_controls),
 		.dapm_widgets		= wm8983_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 078/127] ASoC: use component probe/remove on wm8971
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (76 preceding siblings ...)
  2016-08-09  5:27 ` [PATCH 077/127] ASoC: use component probe/remove on wm8983 Kuninori Morimoto
@ 2016-08-09  5:27 ` Kuninori Morimoto
  2016-08-09  5:28 ` [PATCH 079/127] ASoC: use component probe/remove on wm8961 Kuninori Morimoto
                   ` (48 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8971.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 214fa13..1419628 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -628,8 +628,9 @@ static struct snd_soc_dai_driver wm8971_dai = {
 	.ops = &wm8971_dai_ops,
 };
 
-static int wm8971_probe(struct snd_soc_codec *codec)
+static int wm8971_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8971_priv *wm8971 = snd_soc_codec_get_drvdata(codec);
 
 	INIT_DELAYED_WORK(&wm8971->charge_work, wm8971_charge_work);
@@ -650,11 +651,11 @@ static int wm8971_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8971 = {
-	.probe =	wm8971_probe,
 	.set_bias_level = wm8971_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8971_probe,
 		.controls		= wm8971_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8971_snd_controls),
 		.dapm_widgets		= wm8971_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 079/127] ASoC: use component probe/remove on wm8961
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (77 preceding siblings ...)
  2016-08-09  5:27 ` [PATCH 078/127] ASoC: use component probe/remove on wm8971 Kuninori Morimoto
@ 2016-08-09  5:28 ` Kuninori Morimoto
  2016-08-09  5:28 ` [PATCH 080/127] ASoC: use component probe/remove on wm8955 Kuninori Morimoto
                   ` (47 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8961.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 4b51761..1f4db6e 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -830,8 +830,9 @@ static struct snd_soc_dai_driver wm8961_dai = {
 	.ops = &wm8961_dai_ops,
 };
 
-static int wm8961_probe(struct snd_soc_codec *codec)
+static int wm8961_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	u16 reg;
 
 	/* Enable class W */
@@ -883,12 +884,12 @@ static int wm8961_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8961 = {
-	.probe =	wm8961_probe,
 	.resume =	wm8961_resume,
 	.set_bias_level = wm8961_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8961_probe,
 		.controls		= wm8961_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8961_snd_controls),
 		.dapm_widgets		= wm8961_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 080/127] ASoC: use component probe/remove on wm8955
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (78 preceding siblings ...)
  2016-08-09  5:28 ` [PATCH 079/127] ASoC: use component probe/remove on wm8961 Kuninori Morimoto
@ 2016-08-09  5:28 ` Kuninori Morimoto
  2016-08-09  5:28 ` [PATCH 081/127] ASoC: use component probe/remove on wm8940 Kuninori Morimoto
                   ` (46 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8955.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index 575075d..e659e89 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -865,8 +865,9 @@ static struct snd_soc_dai_driver wm8955_dai = {
 	.ops = &wm8955_dai_ops,
 };
 
-static int wm8955_probe(struct snd_soc_codec *codec)
+static int wm8955_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
 	struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
 	int ret, i;
@@ -941,11 +942,11 @@ err_enable:
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8955 = {
-	.probe =	wm8955_probe,
 	.set_bias_level = wm8955_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8955_probe,
 		.controls		= wm8955_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8955_snd_controls),
 		.dapm_widgets		= wm8955_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 081/127] ASoC: use component probe/remove on wm8940
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (79 preceding siblings ...)
  2016-08-09  5:28 ` [PATCH 080/127] ASoC: use component probe/remove on wm8955 Kuninori Morimoto
@ 2016-08-09  5:28 ` Kuninori Morimoto
  2016-08-09  5:29 ` [PATCH 082/127] ASoC: use component probe/remove on wm8904 Kuninori Morimoto
                   ` (45 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8940.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index 3c9febc..31302e0 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -693,8 +693,9 @@ static struct snd_soc_dai_driver wm8940_dai = {
 	.symmetric_rates = 1,
 };
 
-static int wm8940_probe(struct snd_soc_codec *codec)
+static int wm8940_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8940_setup_data *pdata = codec->dev->platform_data;
 	int ret;
 	u16 reg;
@@ -724,11 +725,11 @@ static int wm8940_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8940 = {
-	.probe =	wm8940_probe,
 	.set_bias_level = wm8940_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8940_probe,
 		.controls		= wm8940_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8940_snd_controls),
 		.dapm_widgets		= wm8940_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 082/127] ASoC: use component probe/remove on wm8904
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (80 preceding siblings ...)
  2016-08-09  5:28 ` [PATCH 081/127] ASoC: use component probe/remove on wm8940 Kuninori Morimoto
@ 2016-08-09  5:29 ` Kuninori Morimoto
  2016-08-09  5:29 ` [PATCH 083/127] ASoC: use component probe/remove on wm8900 Kuninori Morimoto
                   ` (44 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8904.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index edd7a77..01ec4ca 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -2053,8 +2053,9 @@ static void wm8904_handle_pdata(struct snd_soc_codec *codec)
 }
 
 
-static int wm8904_probe(struct snd_soc_codec *codec)
+static int wm8904_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
 
 	switch (wm8904->devtype) {
@@ -2076,21 +2077,22 @@ static int wm8904_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8904_remove(struct snd_soc_codec *codec)
+static void wm8904_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
 
 	kfree(wm8904->retune_mobile_texts);
 	kfree(wm8904->drc_texts);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8904 = {
-	.probe =	wm8904_probe,
-	.remove =	wm8904_remove,
 	.set_bias_level = wm8904_set_bias_level,
 	.idle_bias_off = true,
+	.component_driver = {
+		.probe			= wm8904_probe,
+		.remove			= wm8904_remove,
+	},
 };
 
 static const struct regmap_config wm8904_regmap = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 083/127] ASoC: use component probe/remove on wm8900
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (81 preceding siblings ...)
  2016-08-09  5:29 ` [PATCH 082/127] ASoC: use component probe/remove on wm8904 Kuninori Morimoto
@ 2016-08-09  5:29 ` Kuninori Morimoto
  2016-08-09  5:29 ` [PATCH 084/127] ASoC: use component probe/remove on wm8400 Kuninori Morimoto
                   ` (43 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8900.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 724cec4..ebe6ef0 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -1175,8 +1175,9 @@ static int wm8900_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8900_probe(struct snd_soc_codec *codec)
+static int wm8900_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int reg;
 
 	reg = snd_soc_read(codec, WM8900_REG_ID);
@@ -1209,12 +1210,12 @@ static int wm8900_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8900 = {
-	.probe =	wm8900_probe,
 	.suspend =	wm8900_suspend,
 	.resume =	wm8900_resume,
 	.set_bias_level = wm8900_set_bias_level,
 
 	.component_driver = {
+		.probe			= wm8900_probe,
 		.controls		= wm8900_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8900_snd_controls),
 		.dapm_widgets		= wm8900_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 084/127] ASoC: use component probe/remove on wm8400
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (82 preceding siblings ...)
  2016-08-09  5:29 ` [PATCH 083/127] ASoC: use component probe/remove on wm8900 Kuninori Morimoto
@ 2016-08-09  5:29 ` Kuninori Morimoto
  2016-08-09  5:30 ` [PATCH 085/127] ASoC: use component probe/remove on wm8350 Kuninori Morimoto
                   ` (42 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8400.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 4551e54..67e0730 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -1273,8 +1273,9 @@ static struct snd_soc_dai_driver wm8400_dai = {
 	.ops = &wm8400_dai_ops,
 };
 
-static int wm8400_codec_probe(struct snd_soc_codec *codec)
+static int wm8400_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8400 *wm8400 = dev_get_platdata(codec->dev);
 	struct wm8400_priv *priv;
 	int ret;
@@ -1314,15 +1315,14 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int  wm8400_codec_remove(struct snd_soc_codec *codec)
+static void wm8400_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	u16 reg;
 
 	reg = snd_soc_read(codec, WM8400_POWER_MANAGEMENT_1);
 	snd_soc_write(codec, WM8400_POWER_MANAGEMENT_1,
 		     reg & (~WM8400_CODEC_ENA));
-
-	return 0;
 }
 
 static struct regmap *wm8400_get_regmap(struct device *dev)
@@ -1333,13 +1333,13 @@ static struct regmap *wm8400_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
-	.probe =	wm8400_codec_probe,
-	.remove =	wm8400_codec_remove,
 	.get_regmap =	wm8400_get_regmap,
 	.set_bias_level = wm8400_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8400_codec_probe,
+		.remove			= wm8400_codec_remove,
 		.controls		= wm8400_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8400_snd_controls),
 		.dapm_widgets		= wm8400_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 085/127] ASoC: use component probe/remove on wm8350
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (83 preceding siblings ...)
  2016-08-09  5:29 ` [PATCH 084/127] ASoC: use component probe/remove on wm8400 Kuninori Morimoto
@ 2016-08-09  5:30 ` Kuninori Morimoto
  2016-08-09  5:30 ` [PATCH 086/127] ASoC: use component probe/remove on wm5110 Kuninori Morimoto
                   ` (41 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm8350.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 18bc4ca..9415da3 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1455,8 +1455,9 @@ static struct snd_soc_dai_driver wm8350_dai = {
 	.ops = &wm8350_dai_ops,
 };
 
-static  int wm8350_codec_probe(struct snd_soc_codec *codec)
+static  int wm8350_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8350 *wm8350 = dev_get_platdata(codec->dev);
 	struct wm8350_data *priv;
 	struct wm8350_output *out1;
@@ -1550,8 +1551,9 @@ static  int wm8350_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int  wm8350_codec_remove(struct snd_soc_codec *codec)
+static void wm8350_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec);
 	struct wm8350 *wm8350 = dev_get_platdata(codec->dev);
 
@@ -1576,8 +1578,6 @@ static int  wm8350_codec_remove(struct snd_soc_codec *codec)
 	flush_delayed_work(&priv->pga_work);
 
 	wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA);
-
-	return 0;
 }
 
 static struct regmap *wm8350_get_regmap(struct device *dev)
@@ -1588,13 +1588,13 @@ static struct regmap *wm8350_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8350 = {
-	.probe =	wm8350_codec_probe,
-	.remove =	wm8350_codec_remove,
 	.get_regmap =	wm8350_get_regmap,
 	.set_bias_level = wm8350_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8350_codec_probe,
+		.remove			= wm8350_codec_remove,
 		.controls		= wm8350_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8350_snd_controls),
 		.dapm_widgets		= wm8350_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 086/127] ASoC: use component probe/remove on wm5110
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (84 preceding siblings ...)
  2016-08-09  5:30 ` [PATCH 085/127] ASoC: use component probe/remove on wm8350 Kuninori Morimoto
@ 2016-08-09  5:30 ` Kuninori Morimoto
  2016-08-09  5:30 ` [PATCH 088/127] ASoC: use component probe/remove on wm5100 Kuninori Morimoto
                   ` (40 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm5110.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 3e7f873..cec5f4d 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2258,8 +2258,9 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int wm5110_codec_probe(struct snd_soc_codec *codec)
+static int wm5110_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct arizona *arizona = priv->core.arizona;
@@ -2305,8 +2306,9 @@ err_adsp2_codec_probe:
 	return ret;
 }
 
-static int wm5110_codec_remove(struct snd_soc_codec *codec)
+static void wm5110_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct arizona *arizona = priv->core.arizona;
 	int i;
@@ -2319,8 +2321,6 @@ static int wm5110_codec_remove(struct snd_soc_codec *codec)
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
 
 	arizona_free_spk(codec);
-
-	return 0;
 }
 
 #define WM5110_DIG_VU 0x0200
@@ -2348,8 +2348,6 @@ static struct regmap *wm5110_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm5110 = {
-	.probe = wm5110_codec_probe,
-	.remove = wm5110_codec_remove,
 	.get_regmap = wm5110_get_regmap,
 
 	.idle_bias_off = true,
@@ -2358,6 +2356,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5110 = {
 	.set_pll = wm5110_set_fll,
 
 	.component_driver = {
+		.probe			= wm5110_codec_probe,
+		.remove			= wm5110_codec_remove,
 		.controls		= wm5110_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm5110_snd_controls),
 		.dapm_widgets		= wm5110_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 088/127] ASoC: use component probe/remove on wm5100
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (85 preceding siblings ...)
  2016-08-09  5:30 ` [PATCH 086/127] ASoC: use component probe/remove on wm5110 Kuninori Morimoto
@ 2016-08-09  5:30 ` Kuninori Morimoto
  2016-08-09  5:31 ` [PATCH 089/127] ASoC: use component probe/remove on wm2200 Kuninori Morimoto
                   ` (39 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm5100.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 8cbdf17..cc6247e 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2330,8 +2330,9 @@ static void wm5100_free_gpio(struct i2c_client *i2c)
 }
 #endif
 
-static int wm5100_probe(struct snd_soc_codec *codec)
+static int wm5100_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct i2c_client *i2c = to_i2c_client(codec->dev);
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
@@ -2370,27 +2371,25 @@ err_gpio:
 	return ret;
 }
 
-static int wm5100_remove(struct snd_soc_codec *codec)
+static void wm5100_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
 
 	if (wm5100->pdata.hp_pol) {
 		gpio_free(wm5100->pdata.hp_pol);
 	}
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm5100 = {
-	.probe =	wm5100_probe,
-	.remove =	wm5100_remove,
-
 	.set_sysclk = wm5100_set_sysclk,
 	.set_pll = wm5100_set_fll,
 	.idle_bias_off = 1,
 
 	.seq_notifier = wm5100_seq_notifier,
 	.component_driver = {
+		.probe			= wm5100_probe,
+		.remove			= wm5100_remove,
 		.controls		= wm5100_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm5100_snd_controls),
 		.dapm_widgets		= wm5100_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 089/127] ASoC: use component probe/remove on wm2200
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (86 preceding siblings ...)
  2016-08-09  5:30 ` [PATCH 088/127] ASoC: use component probe/remove on wm5100 Kuninori Morimoto
@ 2016-08-09  5:31 ` Kuninori Morimoto
  2016-08-09  5:31 ` [PATCH 090/127] ASoC: use component probe/remove on wm2000 Kuninori Morimoto
                   ` (38 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm2200.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index d913d0e..1bc35dc 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1548,8 +1548,9 @@ static const struct snd_soc_dapm_route wm2200_dapm_routes[] = {
 	WM2200_MIXER_ROUTES("LHPF2", "LHPF2"),
 };
 
-static int wm2200_probe(struct snd_soc_codec *codec)
+static int wm2200_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm2200_priv *wm2200 = dev_get_drvdata(codec->dev);
 	int ret;
 
@@ -2104,14 +2105,13 @@ static struct snd_soc_dai_driver wm2200_dai = {
 };
 
 static struct snd_soc_codec_driver soc_codec_wm2200 = {
-	.probe = wm2200_probe,
-
 	.idle_bias_off = true,
 	.ignore_pmdown_time = true,
 	.set_sysclk = wm2200_set_sysclk,
 	.set_pll = wm2200_set_fll,
 
 	.component_driver = {
+		.probe			= wm2200_probe,
 		.controls		= wm2200_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm2200_snd_controls),
 		.dapm_widgets		= wm2200_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 090/127] ASoC: use component probe/remove on wm2000
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (87 preceding siblings ...)
  2016-08-09  5:31 ` [PATCH 089/127] ASoC: use component probe/remove on wm2200 Kuninori Morimoto
@ 2016-08-09  5:31 ` Kuninori Morimoto
  2016-08-09  5:32 ` [PATCH 091/127] ASoC: use component probe/remove on wm0010 Kuninori Morimoto
                   ` (37 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm2000.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 1ebaf99..bcc3965 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -782,8 +782,9 @@ static const struct regmap_config wm2000_regmap = {
 	.readable_reg = wm2000_readable_reg,
 };
 
-static int wm2000_probe(struct snd_soc_codec *codec)
+static int wm2000_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
 
 	/* This will trigger a transition to standby mode by default */
@@ -792,20 +793,21 @@ static int wm2000_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm2000_remove(struct snd_soc_codec *codec)
+static void wm2000_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
 
-	return wm2000_anc_transition(wm2000, ANC_OFF);
+	wm2000_anc_transition(wm2000, ANC_OFF);
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm2000 = {
-	.probe = wm2000_probe,
-	.remove = wm2000_remove,
 	.suspend = wm2000_suspend,
 	.resume = wm2000_resume,
 
 	.component_driver = {
+		.probe			= wm2000_probe,
+		.remove			= wm2000_remove,
 		.controls		= wm2000_controls,
 		.num_controls		= ARRAY_SIZE(wm2000_controls),
 		.dapm_widgets		= wm2000_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 091/127] ASoC: use component probe/remove on wm0010
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (88 preceding siblings ...)
  2016-08-09  5:31 ` [PATCH 090/127] ASoC: use component probe/remove on wm2000 Kuninori Morimoto
@ 2016-08-09  5:32 ` Kuninori Morimoto
  2016-08-09  5:32 ` [PATCH 092/127] ASoC: use component probe/remove on wl1273 Kuninori Morimoto
                   ` (36 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wm0010.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index 4ef6919..2687b13 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -787,15 +787,24 @@ static int wm0010_set_sysclk(struct snd_soc_codec *codec, int source,
 	return 0;
 }
 
-static int wm0010_probe(struct snd_soc_codec *codec);
+
+static int wm0010_probe(struct snd_soc_component *component)
+{
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+	struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec);
+
+	wm0010->codec = codec;
+
+	return 0;
+}
 
 static struct snd_soc_codec_driver soc_codec_dev_wm0010 = {
-	.probe = wm0010_probe,
 	.set_bias_level = wm0010_set_bias_level,
 	.set_sysclk = wm0010_set_sysclk,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm0010_probe,
 		.dapm_widgets		= wm0010_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(wm0010_dapm_widgets),
 		.dapm_routes		= wm0010_dapm_routes,
@@ -864,15 +873,6 @@ static irqreturn_t wm0010_irq(int irq, void *data)
 	return IRQ_NONE;
 }
 
-static int wm0010_probe(struct snd_soc_codec *codec)
-{
-	struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec);
-
-	wm0010->codec = codec;
-
-	return 0;
-}
-
 static int wm0010_spi_probe(struct spi_device *spi)
 {
 	unsigned long gpio_flags;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 092/127] ASoC: use component probe/remove on wl1273
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (89 preceding siblings ...)
  2016-08-09  5:32 ` [PATCH 091/127] ASoC: use component probe/remove on wm0010 Kuninori Morimoto
@ 2016-08-09  5:32 ` Kuninori Morimoto
  2016-08-09  5:32 ` [PATCH 093/127] ASoC: use component probe/remove on uda1380 Kuninori Morimoto
                   ` (35 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/wl1273.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c
index fcffb6e..d5005f8 100644
--- a/sound/soc/codecs/wl1273.c
+++ b/sound/soc/codecs/wl1273.c
@@ -446,8 +446,9 @@ int wl1273_get_format(struct snd_soc_codec *codec, unsigned int *fmt)
 }
 EXPORT_SYMBOL_GPL(wl1273_get_format);
 
-static int wl1273_probe(struct snd_soc_codec *codec)
+static int wl1273_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wl1273_core **core = codec->dev->platform_data;
 	struct wl1273_priv *wl1273;
 
@@ -470,21 +471,19 @@ static int wl1273_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wl1273_remove(struct snd_soc_codec *codec)
+static void wl1273_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
 
 	dev_dbg(codec->dev, "%s\n", __func__);
 	kfree(wl1273);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wl1273 = {
-	.probe = wl1273_probe,
-	.remove = wl1273_remove,
-
 	.component_driver = {
+		.probe			= wl1273_probe,
+		.remove			= wl1273_remove,
 		.controls		= wl1273_controls,
 		.num_controls		= ARRAY_SIZE(wl1273_controls),
 		.dapm_widgets		= wl1273_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 093/127] ASoC: use component probe/remove on uda1380
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (90 preceding siblings ...)
  2016-08-09  5:32 ` [PATCH 092/127] ASoC: use component probe/remove on wl1273 Kuninori Morimoto
@ 2016-08-09  5:32 ` Kuninori Morimoto
  2016-08-09  5:33 ` [PATCH 094/127] ASoC: use component probe/remove on uda134x Kuninori Morimoto
                   ` (34 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/uda1380.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 533e3bb..2e2ebc9 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -687,8 +687,9 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
 },
 };
 
-static int uda1380_probe(struct snd_soc_codec *codec)
+static int uda1380_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct uda1380_platform_data *pdata =codec->dev->platform_data;
 	struct uda1380_priv *uda1380 = snd_soc_codec_get_drvdata(codec);
 	int ret;
@@ -742,19 +743,16 @@ err_out:
 }
 
 /* power down chip */
-static int uda1380_remove(struct snd_soc_codec *codec)
+static void uda1380_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct uda1380_platform_data *pdata =codec->dev->platform_data;
 
 	gpio_free(pdata->gpio_reset);
 	gpio_free(pdata->gpio_power);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
-	.probe =	uda1380_probe,
-	.remove =	uda1380_remove,
 	.read =		uda1380_read_reg_cache,
 	.write =	uda1380_write,
 	.set_bias_level = uda1380_set_bias_level,
@@ -766,6 +764,8 @@ static struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
 	.reg_cache_step = 1,
 
 	.component_driver = {
+		.probe			= uda1380_probe,
+		.remove			= uda1380_remove,
 		.controls		= uda1380_snd_controls,
 		.num_controls		= ARRAY_SIZE(uda1380_snd_controls),
 		.dapm_widgets		= uda1380_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 094/127] ASoC: use component probe/remove on uda134x
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (91 preceding siblings ...)
  2016-08-09  5:32 ` [PATCH 093/127] ASoC: use component probe/remove on uda1380 Kuninori Morimoto
@ 2016-08-09  5:33 ` Kuninori Morimoto
  2016-08-09  5:33 ` [PATCH 095/127] ASoC: use component probe/remove on twl6040 Kuninori Morimoto
                   ` (33 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/uda134x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index a4a3e98..d78de75 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -446,8 +446,9 @@ static struct snd_soc_dai_driver uda134x_dai = {
 	.ops = &uda134x_dai_ops,
 };
 
-static int uda134x_soc_probe(struct snd_soc_codec *codec)
+static int uda134x_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec);
 	struct uda134x_platform_data *pd = uda134x->pd;
@@ -519,11 +520,11 @@ static int uda134x_soc_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_uda134x = {
-	.probe =        uda134x_soc_probe,
 	.set_bias_level = uda134x_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= uda134x_soc_probe,
 		.dapm_widgets		= uda134x_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(uda134x_dapm_widgets),
 		.dapm_routes		= uda134x_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 095/127] ASoC: use component probe/remove on twl6040
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (92 preceding siblings ...)
  2016-08-09  5:33 ` [PATCH 094/127] ASoC: use component probe/remove on uda134x Kuninori Morimoto
@ 2016-08-09  5:33 ` Kuninori Morimoto
  2016-08-09  5:34 ` [PATCH 096/127] ASoC: use component probe/remove on twl4030 Kuninori Morimoto
                   ` (32 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/twl6040.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 748036e..38e702f 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -1097,8 +1097,9 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
 },
 };
 
-static int twl6040_probe(struct snd_soc_codec *codec)
+static int twl6040_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct twl6040_data *priv;
 	struct twl6040 *twl6040 = dev_get_drvdata(codec->dev->parent);
 	struct platform_device *pdev = to_platform_device(codec->dev);
@@ -1138,18 +1139,15 @@ static int twl6040_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int twl6040_remove(struct snd_soc_codec *codec)
+static void twl6040_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
 
 	free_irq(priv->plug_irq, codec);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
-	.probe = twl6040_probe,
-	.remove = twl6040_remove,
 	.read = twl6040_read,
 	.write = twl6040_write,
 	.set_bias_level = twl6040_set_bias_level,
@@ -1157,6 +1155,8 @@ static struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
 	.ignore_pmdown_time = true,
 
 	.component_driver = {
+		.probe			= twl6040_probe,
+		.remove			= twl6040_remove,
 		.controls		= twl6040_snd_controls,
 		.num_controls		= ARRAY_SIZE(twl6040_snd_controls),
 		.dapm_widgets		= twl6040_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 096/127] ASoC: use component probe/remove on twl4030
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (93 preceding siblings ...)
  2016-08-09  5:33 ` [PATCH 095/127] ASoC: use component probe/remove on twl6040 Kuninori Morimoto
@ 2016-08-09  5:34 ` Kuninori Morimoto
  2016-08-09  5:34 ` [PATCH 097/127] ASoC: use component probe/remove on tlv320dac33 Kuninori Morimoto
                   ` (31 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/twl4030.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index a2104d6..4e05b7f 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2163,8 +2163,9 @@ static struct snd_soc_dai_driver twl4030_dai[] = {
 },
 };
 
-static int twl4030_soc_probe(struct snd_soc_codec *codec)
+static int twl4030_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct twl4030_priv *twl4030;
 
 	twl4030 = devm_kzalloc(codec->dev, sizeof(struct twl4030_priv),
@@ -2180,26 +2181,25 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int twl4030_soc_remove(struct snd_soc_codec *codec)
+static void twl4030_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
 	struct twl4030_codec_data *pdata = twl4030->pdata;
 
 	if (pdata && pdata->hs_extmute && gpio_is_valid(pdata->hs_extmute_gpio))
 		gpio_free(pdata->hs_extmute_gpio);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
-	.probe = twl4030_soc_probe,
-	.remove = twl4030_soc_remove,
 	.read = twl4030_read,
 	.write = twl4030_write,
 	.set_bias_level = twl4030_set_bias_level,
 	.idle_bias_off = true,
 
 	.component_driver = {
+		.probe			= twl4030_soc_probe,
+		.remove			= twl4030_soc_remove,
 		.controls		= twl4030_snd_controls,
 		.num_controls		= ARRAY_SIZE(twl4030_snd_controls),
 		.dapm_widgets		= twl4030_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 097/127] ASoC: use component probe/remove on tlv320dac33
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (94 preceding siblings ...)
  2016-08-09  5:34 ` [PATCH 096/127] ASoC: use component probe/remove on twl4030 Kuninori Morimoto
@ 2016-08-09  5:34 ` Kuninori Morimoto
  2016-08-09  5:34 ` [PATCH 098/127] ASoC: use component probe/remove on tlv320aic32x4 Kuninori Morimoto
                   ` (30 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320dac33.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index d64eac7..d5be1bc 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1375,8 +1375,9 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	return 0;
 }
 
-static int dac33_soc_probe(struct snd_soc_codec *codec)
+static int dac33_soc_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
 	int ret = 0;
 
@@ -1431,15 +1432,15 @@ err_power:
 	return ret;
 }
 
-static int dac33_soc_remove(struct snd_soc_codec *codec)
+static void dac33_soc_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
 
 	if (dac33->irq >= 0) {
 		free_irq(dac33->irq, dac33->codec);
 		destroy_workqueue(dac33->dac33_wq);
 	}
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
@@ -1450,10 +1451,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
 	.reg_cache_size = ARRAY_SIZE(dac33_reg),
 	.reg_word_size = sizeof(u8),
 	.reg_cache_default = dac33_reg,
-	.probe = dac33_soc_probe,
-	.remove = dac33_soc_remove,
 
 	.component_driver = {
+		.probe			= dac33_soc_probe,
+		.remove			= dac33_soc_remove,
 		.controls		= dac33_snd_controls,
 		.num_controls		= ARRAY_SIZE(dac33_snd_controls),
 		.dapm_widgets		= dac33_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 098/127] ASoC: use component probe/remove on tlv320aic32x4
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (95 preceding siblings ...)
  2016-08-09  5:34 ` [PATCH 097/127] ASoC: use component probe/remove on tlv320dac33 Kuninori Morimoto
@ 2016-08-09  5:34 ` Kuninori Morimoto
  2016-08-09  5:35 ` [PATCH 099/127] ASoC: use component probe/remove on tlv320aic26 Kuninori Morimoto
                   ` (29 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320aic32x4.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 28fdfc5..745d76c 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -734,8 +734,9 @@ static struct snd_soc_dai_driver aic32x4_dai = {
 	.symmetric_rates = 1,
 };
 
-static int aic32x4_codec_probe(struct snd_soc_codec *codec)
+static int aic32x4_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
 	u32 tmp_reg;
 
@@ -793,11 +794,11 @@ static int aic32x4_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_aic32x4 = {
-	.probe = aic32x4_codec_probe,
 	.set_bias_level = aic32x4_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= aic32x4_codec_probe,
 		.controls		= aic32x4_snd_controls,
 		.num_controls		= ARRAY_SIZE(aic32x4_snd_controls),
 		.dapm_widgets		= aic32x4_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 099/127] ASoC: use component probe/remove on tlv320aic26
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (96 preceding siblings ...)
  2016-08-09  5:34 ` [PATCH 098/127] ASoC: use component probe/remove on tlv320aic32x4 Kuninori Morimoto
@ 2016-08-09  5:35 ` Kuninori Morimoto
  2016-08-09  5:35 ` [PATCH 100/127] ASoC: use component probe/remove on stac9766 Kuninori Morimoto
                   ` (28 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/tlv320aic26.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 14aa96d..da5cc5f 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -291,8 +291,9 @@ static DEVICE_ATTR(keyclick, 0644, aic26_keyclick_show, aic26_keyclick_set);
 /* ---------------------------------------------------------------------
  * SoC CODEC portion of driver: probe and release routines
  */
-static int aic26_probe(struct snd_soc_codec *codec)
+static int aic26_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct aic26 *aic26 = dev_get_drvdata(codec->dev);
 	int ret, reg;
 
@@ -320,8 +321,8 @@ static int aic26_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver aic26_soc_codec_dev = {
-	.probe = aic26_probe,
 	.component_driver = {
+		.probe			= aic26_probe,
 		.controls		= aic26_snd_controls,
 		.num_controls		= ARRAY_SIZE(aic26_snd_controls),
 		.dapm_widgets		= tlv320aic26_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 100/127] ASoC: use component probe/remove on stac9766
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (97 preceding siblings ...)
  2016-08-09  5:35 ` [PATCH 099/127] ASoC: use component probe/remove on tlv320aic26 Kuninori Morimoto
@ 2016-08-09  5:35 ` Kuninori Morimoto
  2016-08-09  5:36 ` [PATCH 101/127] ASoC: use component probe/remove on sn95031 Kuninori Morimoto
                   ` (27 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/stac9766.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 2c5941f..1750588 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -297,8 +297,9 @@ static struct snd_soc_dai_driver stac9766_dai[] = {
 }
 };
 
-static int stac9766_codec_probe(struct snd_soc_codec *codec)
+static int stac9766_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97;
 
 	ac97 = snd_soc_new_ac97_codec(codec, STAC9766_VENDOR_ID,
@@ -311,16 +312,18 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int stac9766_codec_remove(struct snd_soc_codec *codec)
+static void stac9766_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec);
 
 	snd_soc_free_ac97_codec(ac97);
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
 	.component_driver = {
+		.probe			= stac9766_codec_probe,
+		.remove			= stac9766_codec_remove,
 		.controls		= stac9766_snd_ac97_controls,
 		.num_controls		= ARRAY_SIZE(stac9766_snd_ac97_controls),
 	},
@@ -328,8 +331,6 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
 	.read = stac9766_ac97_read,
 	.set_bias_level = stac9766_set_bias_level,
 	.suspend_bias_off = true,
-	.probe = stac9766_codec_probe,
-	.remove = stac9766_codec_remove,
 	.resume = stac9766_codec_resume,
 	.reg_cache_size = ARRAY_SIZE(stac9766_reg),
 	.reg_word_size = sizeof(u16),
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 101/127] ASoC: use component probe/remove on sn95031
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (98 preceding siblings ...)
  2016-08-09  5:35 ` [PATCH 100/127] ASoC: use component probe/remove on stac9766 Kuninori Morimoto
@ 2016-08-09  5:36 ` Kuninori Morimoto
  2016-08-09  5:36 ` [PATCH 102/127] ASoC: use component probe/remove on rt5677 Kuninori Morimoto
                   ` (26 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/sn95031.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index eae54c3..d212967 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -834,8 +834,10 @@ void sn95031_jack_detection(struct snd_soc_codec *codec,
 EXPORT_SYMBOL_GPL(sn95031_jack_detection);
 
 /* codec registration */
-static int sn95031_codec_probe(struct snd_soc_codec *codec)
+static int sn95031_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	pr_debug("codec_probe called\n");
 
 	/* PCM interface config
@@ -884,11 +886,11 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver sn95031_codec = {
-	.probe		= sn95031_codec_probe,
 	.set_bias_level	= sn95031_set_vaud_bias,
 	.idle_bias_off	= true,
 
 	.component_driver = {
+		.probe			= sn95031_codec_probe,
 		.controls		= sn95031_snd_controls,
 		.num_controls		= ARRAY_SIZE(sn95031_snd_controls),
 		.dapm_widgets		= sn95031_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 102/127] ASoC: use component probe/remove on rt5677
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (99 preceding siblings ...)
  2016-08-09  5:36 ` [PATCH 101/127] ASoC: use component probe/remove on sn95031 Kuninori Morimoto
@ 2016-08-09  5:36 ` Kuninori Morimoto
  2016-08-09  5:36 ` [PATCH 103/127] ASoC: use component probe/remove on rt5670 Kuninori Morimoto
                   ` (25 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5677.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 68268f2..3818e6f 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -4704,8 +4704,9 @@ static void rt5677_free_gpio(struct i2c_client *i2c)
 }
 #endif
 
-static int rt5677_probe(struct snd_soc_codec *codec)
+static int rt5677_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
 	int i;
@@ -4761,15 +4762,14 @@ static int rt5677_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt5677_remove(struct snd_soc_codec *codec)
+static void rt5677_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
 
 	regmap_write(rt5677->regmap, RT5677_RESET, 0x10ec);
 	gpiod_set_value_cansleep(rt5677->pow_ldo2, 0);
 	gpiod_set_value_cansleep(rt5677->reset_pin, 1);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -4968,13 +4968,13 @@ static struct snd_soc_dai_driver rt5677_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5677 = {
-	.probe = rt5677_probe,
-	.remove = rt5677_remove,
 	.suspend = rt5677_suspend,
 	.resume = rt5677_resume,
 	.set_bias_level = rt5677_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5677_probe,
+		.remove			= rt5677_remove,
 		.controls		= rt5677_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5677_snd_controls),
 		.dapm_widgets		= rt5677_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 103/127] ASoC: use component probe/remove on rt5670
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (100 preceding siblings ...)
  2016-08-09  5:36 ` [PATCH 102/127] ASoC: use component probe/remove on rt5677 Kuninori Morimoto
@ 2016-08-09  5:36 ` Kuninori Morimoto
  2016-08-09  5:37 ` [PATCH 104/127] ASoC: use component probe/remove on rt5659 Kuninori Morimoto
                   ` (24 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5670.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 49caf13..850f4ea 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -2651,8 +2651,9 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5670_probe(struct snd_soc_codec *codec)
+static int rt5670_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
 
@@ -2684,13 +2685,13 @@ static int rt5670_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt5670_remove(struct snd_soc_codec *codec)
+static void rt5670_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
 
 	regmap_write(rt5670->regmap, RT5670_RESET, 0);
 	snd_soc_jack_free_gpios(rt5670->jack, 1, &rt5670->hp_gpio);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -2771,13 +2772,13 @@ static struct snd_soc_dai_driver rt5670_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5670 = {
-	.probe = rt5670_probe,
-	.remove = rt5670_remove,
 	.suspend = rt5670_suspend,
 	.resume = rt5670_resume,
 	.set_bias_level = rt5670_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5670_probe,
+		.remove			= rt5670_remove,
 		.controls		= rt5670_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5670_snd_controls),
 		.dapm_widgets		= rt5670_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 104/127] ASoC: use component probe/remove on rt5659
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (101 preceding siblings ...)
  2016-08-09  5:36 ` [PATCH 103/127] ASoC: use component probe/remove on rt5670 Kuninori Morimoto
@ 2016-08-09  5:37 ` Kuninori Morimoto
  2016-08-09  5:38 ` [PATCH 105/127] ASoC: use component probe/remove on rt5651 Kuninori Morimoto
                   ` (23 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5659.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 59ddaf3..47e0758 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -3600,8 +3600,9 @@ static int rt5659_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5659_probe(struct snd_soc_codec *codec)
+static int rt5659_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5659_priv *rt5659 = snd_soc_codec_get_drvdata(codec);
 
 	rt5659->codec = codec;
@@ -3609,13 +3610,12 @@ static int rt5659_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt5659_remove(struct snd_soc_codec *codec)
+static void rt5659_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5659_priv *rt5659 = snd_soc_codec_get_drvdata(codec);
 
 	regmap_write(rt5659->regmap, RT5659_RESET, 0);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3716,13 +3716,13 @@ static struct snd_soc_dai_driver rt5659_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5659 = {
-	.probe = rt5659_probe,
-	.remove = rt5659_remove,
 	.suspend = rt5659_suspend,
 	.resume = rt5659_resume,
 	.set_bias_level = rt5659_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5659_probe,
+		.remove			= rt5659_remove,
 		.controls		= rt5659_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5659_snd_controls),
 		.dapm_widgets		= rt5659_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 105/127] ASoC: use component probe/remove on rt5651
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (102 preceding siblings ...)
  2016-08-09  5:37 ` [PATCH 104/127] ASoC: use component probe/remove on rt5659 Kuninori Morimoto
@ 2016-08-09  5:38 ` Kuninori Morimoto
  2016-08-09  5:38 ` [PATCH 106/127] ASoC: use component probe/remove on rt5645 Kuninori Morimoto
                   ` (22 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5651.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index f5d3415..5c0b1b6 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -1609,8 +1609,9 @@ static int rt5651_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5651_probe(struct snd_soc_codec *codec)
+static int rt5651_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5651_priv *rt5651 = snd_soc_codec_get_drvdata(codec);
 
 	rt5651->codec = codec;
@@ -1707,12 +1708,12 @@ static struct snd_soc_dai_driver rt5651_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5651 = {
-	.probe = rt5651_probe,
 	.suspend = rt5651_suspend,
 	.resume = rt5651_resume,
 	.set_bias_level = rt5651_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5651_probe,
 		.controls		= rt5651_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5651_snd_controls),
 		.dapm_widgets		= rt5651_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 106/127] ASoC: use component probe/remove on rt5645
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (103 preceding siblings ...)
  2016-08-09  5:38 ` [PATCH 105/127] ASoC: use component probe/remove on rt5651 Kuninori Morimoto
@ 2016-08-09  5:38 ` Kuninori Morimoto
  2016-08-09  5:38 ` [PATCH 107/127] ASoC: use component probe/remove on rt5640 Kuninori Morimoto
                   ` (21 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5645.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 10c2a56..8ae375b 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3352,8 +3352,9 @@ static void rt5645_btn_check_callback(unsigned long data)
 		   &rt5645->jack_detect_work, msecs_to_jiffies(5));
 }
 
-static int rt5645_probe(struct snd_soc_codec *codec)
+static int rt5645_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec);
 
@@ -3393,10 +3394,11 @@ static int rt5645_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt5645_remove(struct snd_soc_codec *codec)
+static void rt5645_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	rt5645_reset(codec);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3478,13 +3480,13 @@ static struct snd_soc_dai_driver rt5645_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5645 = {
-	.probe = rt5645_probe,
-	.remove = rt5645_remove,
 	.suspend = rt5645_suspend,
 	.resume = rt5645_resume,
 	.set_bias_level = rt5645_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5645_probe,
+		.remove			= rt5645_remove,
 		.controls		= rt5645_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5645_snd_controls),
 		.dapm_widgets		= rt5645_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 107/127] ASoC: use component probe/remove on rt5640
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (104 preceding siblings ...)
  2016-08-09  5:38 ` [PATCH 106/127] ASoC: use component probe/remove on rt5645 Kuninori Morimoto
@ 2016-08-09  5:38 ` Kuninori Morimoto
  2016-08-09  5:39 ` [PATCH 108/127] ASoC: use component probe/remove on rt5514 Kuninori Morimoto
                   ` (20 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:38 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5640.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index fbe3af1..24aa8a0 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2109,8 +2109,9 @@ int rt5640_sel_asrc_clk_src(struct snd_soc_codec *codec,
 }
 EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src);
 
-static int rt5640_probe(struct snd_soc_codec *codec)
+static int rt5640_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 	struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
 
@@ -2161,11 +2162,11 @@ static int rt5640_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt5640_remove(struct snd_soc_codec *codec)
+static void rt5640_remove(struct snd_soc_component *component)
 {
-	rt5640_reset(codec);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 
-	return 0;
+	rt5640_reset(codec);
 }
 
 #ifdef CONFIG_PM
@@ -2255,13 +2256,13 @@ static struct snd_soc_dai_driver rt5640_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5640 = {
-	.probe = rt5640_probe,
-	.remove = rt5640_remove,
 	.suspend = rt5640_suspend,
 	.resume = rt5640_resume,
 	.set_bias_level = rt5640_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt5640_probe,
+		.remove			= rt5640_remove,
 		.controls		= rt5640_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5640_snd_controls),
 		.dapm_widgets		= rt5640_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 108/127] ASoC: use component probe/remove on rt5514
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (105 preceding siblings ...)
  2016-08-09  5:38 ` [PATCH 107/127] ASoC: use component probe/remove on rt5640 Kuninori Morimoto
@ 2016-08-09  5:39 ` Kuninori Morimoto
  2016-08-09  5:39 ` [PATCH 109/127] ASoC: use component probe/remove on rt298 Kuninori Morimoto
                   ` (19 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt5514.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index e0606a5..6f164a1 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -959,8 +959,9 @@ static int rt5514_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int rt5514_probe(struct snd_soc_codec *codec)
+static int rt5514_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt5514_priv *rt5514 = snd_soc_codec_get_drvdata(codec);
 
 	rt5514->mclk = devm_clk_get(codec->dev, "mclk");
@@ -1020,10 +1021,10 @@ struct snd_soc_dai_driver rt5514_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt5514 = {
-	.probe = rt5514_probe,
 	.idle_bias_off = true,
 	.set_bias_level = rt5514_set_bias_level,
 	.component_driver = {
+		.probe			= rt5514_probe,
 		.controls		= rt5514_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt5514_snd_controls),
 		.dapm_widgets		= rt5514_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 109/127] ASoC: use component probe/remove on rt298
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (106 preceding siblings ...)
  2016-08-09  5:39 ` [PATCH 108/127] ASoC: use component probe/remove on rt5514 Kuninori Morimoto
@ 2016-08-09  5:39 ` Kuninori Morimoto
  2016-08-09  5:40 ` [PATCH 110/127] ASoC: use component probe/remove on rt286 Kuninori Morimoto
                   ` (18 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt298.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 5555864..fe5832f 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -978,8 +978,9 @@ static irqreturn_t rt298_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int rt298_probe(struct snd_soc_codec *codec)
+static int rt298_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec);
 
 	rt298->codec = codec;
@@ -997,13 +998,12 @@ static int rt298_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt298_remove(struct snd_soc_codec *codec)
+static void rt298_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec);
 
 	cancel_delayed_work_sync(&rt298->jack_detect_work);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1089,13 +1089,13 @@ static struct snd_soc_dai_driver rt298_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt298 = {
-	.probe = rt298_probe,
-	.remove = rt298_remove,
 	.suspend = rt298_suspend,
 	.resume = rt298_resume,
 	.set_bias_level = rt298_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt298_probe,
+		.remove			= rt298_remove,
 		.controls		= rt298_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt298_snd_controls),
 		.dapm_widgets		= rt298_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 110/127] ASoC: use component probe/remove on rt286
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (107 preceding siblings ...)
  2016-08-09  5:39 ` [PATCH 109/127] ASoC: use component probe/remove on rt298 Kuninori Morimoto
@ 2016-08-09  5:40 ` Kuninori Morimoto
  2016-08-09  5:40 ` [PATCH 111/127] ASoC: use component probe/remove on nau8825 Kuninori Morimoto
                   ` (17 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/rt286.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 9c365a7..ecd35fb 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -937,8 +937,9 @@ static irqreturn_t rt286_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int rt286_probe(struct snd_soc_codec *codec)
+static int rt286_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
 
 	rt286->codec = codec;
@@ -956,13 +957,12 @@ static int rt286_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int rt286_remove(struct snd_soc_codec *codec)
+static void rt286_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
 
 	cancel_delayed_work_sync(&rt286->jack_detect_work);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1047,13 +1047,13 @@ static struct snd_soc_dai_driver rt286_dai[] = {
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_rt286 = {
-	.probe = rt286_probe,
-	.remove = rt286_remove,
 	.suspend = rt286_suspend,
 	.resume = rt286_resume,
 	.set_bias_level = rt286_set_bias_level,
 	.idle_bias_off = true,
 	.component_driver = {
+		.probe			= rt286_probe,
+		.remove			= rt286_remove,
 		.controls		= rt286_snd_controls,
 		.num_controls		= ARRAY_SIZE(rt286_snd_controls),
 		.dapm_widgets		= rt286_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 111/127] ASoC: use component probe/remove on nau8825
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (108 preceding siblings ...)
  2016-08-09  5:40 ` [PATCH 110/127] ASoC: use component probe/remove on rt286 Kuninori Morimoto
@ 2016-08-09  5:40 ` Kuninori Morimoto
  2016-08-09  5:40 ` [PATCH 112/127] ASoC: use component probe/remove on ml26124 Kuninori Morimoto
                   ` (16 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/nau8825.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 822791eb..f02a371 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1832,8 +1832,9 @@ static const struct regmap_config nau8825_regmap_config = {
 	.num_reg_defaults = ARRAY_SIZE(nau8825_reg_defaults),
 };
 
-static int nau8825_codec_probe(struct snd_soc_codec *codec)
+static int nau8825_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -1842,14 +1843,13 @@ static int nau8825_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int nau8825_codec_remove(struct snd_soc_codec *codec)
+static void nau8825_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec);
 
 	/* Cancel and reset cross tak suppresstion detection funciton */
 	nau8825_xtalk_cancel(nau8825);
-
-	return 0;
 }
 
 /**
@@ -2261,8 +2261,6 @@ static int __maybe_unused nau8825_resume(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver nau8825_codec_driver = {
-	.probe = nau8825_codec_probe,
-	.remove = nau8825_codec_remove,
 	.set_sysclk = nau8825_set_sysclk,
 	.set_pll = nau8825_set_pll,
 	.set_bias_level = nau8825_set_bias_level,
@@ -2271,6 +2269,8 @@ static struct snd_soc_codec_driver nau8825_codec_driver = {
 	.resume = nau8825_resume,
 
 	.component_driver = {
+		.probe			= nau8825_codec_probe,
+		.remove			= nau8825_codec_remove,
 		.controls		= nau8825_controls,
 		.num_controls		= ARRAY_SIZE(nau8825_controls),
 		.dapm_widgets		= nau8825_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 112/127] ASoC: use component probe/remove on ml26124
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (109 preceding siblings ...)
  2016-08-09  5:40 ` [PATCH 111/127] ASoC: use component probe/remove on nau8825 Kuninori Morimoto
@ 2016-08-09  5:40 ` Kuninori Morimoto
  2016-08-09  5:41 ` [PATCH 113/127] ASoC: use component probe/remove on mc13783 Kuninori Morimoto
                   ` (15 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/ml26124.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index 69e5e18..ba68349 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -528,8 +528,10 @@ static struct snd_soc_dai_driver ml26124_dai = {
 	.symmetric_rates = 1,
 };
 
-static int ml26124_probe(struct snd_soc_codec *codec)
+static int ml26124_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	/* Software Reset */
 	snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 1);
 	snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 0);
@@ -538,10 +540,10 @@ static int ml26124_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ml26124 = {
-	.probe =	ml26124_probe,
 	.set_bias_level = ml26124_set_bias_level,
 	.suspend_bias_off = true,
 	.component_driver = {
+		.probe			= ml26124_probe,
 		.controls		= ml26124_snd_controls,
 		.num_controls		= ARRAY_SIZE(ml26124_snd_controls),
 		.dapm_widgets		= ml26124_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 113/127] ASoC: use component probe/remove on mc13783
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (110 preceding siblings ...)
  2016-08-09  5:40 ` [PATCH 112/127] ASoC: use component probe/remove on ml26124 Kuninori Morimoto
@ 2016-08-09  5:41 ` Kuninori Morimoto
  2016-08-09  5:41 ` [PATCH 114/127] ASoC: use component probe/remove on max98926 Kuninori Morimoto
                   ` (14 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:41 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/mc13783.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 9056270..84f5ee5 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -606,8 +606,9 @@ static struct snd_kcontrol_new mc13783_control_list[] = {
 	SOC_SINGLE("MC2 Capture Bias Switch", MC13783_AUDIO_TX, 1, 1, 0),
 };
 
-static int mc13783_probe(struct snd_soc_codec *codec)
+static int mc13783_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	/* these are the reset values */
@@ -635,14 +636,13 @@ static int mc13783_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int mc13783_remove(struct snd_soc_codec *codec)
+static void mc13783_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	/* Make sure VAUDIOON is off */
 	mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_RX0, 0x3, 0);
-
-	return 0;
 }
 
 #define MC13783_RATES_RECORD (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000)
@@ -734,10 +734,10 @@ static struct regmap *mc13783_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_mc13783 = {
-	.probe		= mc13783_probe,
-	.remove		= mc13783_remove,
 	.get_regmap	= mc13783_get_regmap,
 	.component_driver = {
+		.probe			= mc13783_probe,
+		.remove			= mc13783_remove,
 		.controls		= mc13783_control_list,
 		.num_controls		= ARRAY_SIZE(mc13783_control_list),
 		.dapm_widgets		= mc13783_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 114/127] ASoC: use component probe/remove on max98926
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (111 preceding siblings ...)
  2016-08-09  5:41 ` [PATCH 113/127] ASoC: use component probe/remove on mc13783 Kuninori Morimoto
@ 2016-08-09  5:41 ` Kuninori Morimoto
  2016-08-09  5:41 ` [PATCH 115/127] ASoC: use component probe/remove on max98925 Kuninori Morimoto
                   ` (13 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:41 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98926.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c
index 5830a81..1e3befd 100644
--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -485,8 +485,9 @@ static struct snd_soc_dai_driver max98926_dai[] = {
 }
 };
 
-static int max98926_probe(struct snd_soc_codec *codec)
+static int max98926_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98926_priv *max98926 = snd_soc_codec_get_drvdata(codec);
 
 	max98926->codec = codec;
@@ -497,8 +498,8 @@ static int max98926_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max98926 = {
-	.probe	= max98926_probe,
 	.component_driver = {
+		.probe			= max98926_probe,
 		.controls		= max98926_snd_controls,
 		.num_controls		= ARRAY_SIZE(max98926_snd_controls),
 		.dapm_routes		= max98926_audio_map,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 115/127] ASoC: use component probe/remove on max98925
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (112 preceding siblings ...)
  2016-08-09  5:41 ` [PATCH 114/127] ASoC: use component probe/remove on max98926 Kuninori Morimoto
@ 2016-08-09  5:41 ` Kuninori Morimoto
  2016-08-09  5:42 ` [PATCH 116/127] ASoC: use component probe/remove on max9867 Kuninori Morimoto
                   ` (12 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:41 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98925.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c
index 327eaa2..b8ca524 100644
--- a/sound/soc/codecs/max98925.c
+++ b/sound/soc/codecs/max98925.c
@@ -516,8 +516,9 @@ static struct snd_soc_dai_driver max98925_dai[] = {
 	}
 };
 
-static int max98925_probe(struct snd_soc_codec *codec)
+static int max98925_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec);
 
 	max98925->codec = codec;
@@ -539,8 +540,8 @@ static int max98925_probe(struct snd_soc_codec *codec)
 }
 
 static const struct snd_soc_codec_driver soc_codec_dev_max98925 = {
-	.probe            = max98925_probe,
 	.component_driver = {
+		.probe			= max98925_probe,
 		.controls		= max98925_snd_controls,
 		.num_controls		= ARRAY_SIZE(max98925_snd_controls),
 		.dapm_routes		= max98925_audio_map,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 116/127] ASoC: use component probe/remove on max9867
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (113 preceding siblings ...)
  2016-08-09  5:41 ` [PATCH 115/127] ASoC: use component probe/remove on max98925 Kuninori Morimoto
@ 2016-08-09  5:42 ` Kuninori Morimoto
  2016-08-09  5:42 ` [PATCH 117/127] ASoC: use component probe/remove on max9850 Kuninori Morimoto
                   ` (11 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max9867.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index c967323..f9f6e4f 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -406,8 +406,9 @@ static int max9867_resume(struct device *dev)
 }
 #endif
 
-static int max9867_probe(struct snd_soc_codec *codec)
+static int max9867_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec);
 
 	dev_dbg(codec->dev, "max98090_probe\n");
@@ -416,8 +417,8 @@ static int max9867_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver max9867_codec = {
-	.probe = max9867_probe,
 	.component_driver = {
+		.probe			= max9867_probe,
 		.controls		= max9867_snd_controls,
 		.num_controls		= ARRAY_SIZE(max9867_snd_controls),
 		.dapm_routes		= max9867_audio_map,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 117/127] ASoC: use component probe/remove on max9850
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (114 preceding siblings ...)
  2016-08-09  5:42 ` [PATCH 116/127] ASoC: use component probe/remove on max9867 Kuninori Morimoto
@ 2016-08-09  5:42 ` Kuninori Morimoto
  2016-08-09  5:42 ` [PATCH 118/127] ASoC: use component probe/remove on max98357a Kuninori Morimoto
                   ` (10 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max9850.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c
index 0610840..36c6edd 100644
--- a/sound/soc/codecs/max9850.c
+++ b/sound/soc/codecs/max9850.c
@@ -289,8 +289,10 @@ static struct snd_soc_dai_driver max9850_dai = {
 	.ops = &max9850_dai_ops,
 };
 
-static int max9850_probe(struct snd_soc_codec *codec)
+static int max9850_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	/* enable zero-detect */
 	snd_soc_update_bits(codec, MAX9850_GENERAL_PURPOSE, 1, 1);
 	/* enable slew-rate control */
@@ -302,11 +304,11 @@ static int max9850_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max9850 = {
-	.probe =	max9850_probe,
 	.set_bias_level = max9850_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= max9850_probe,
 		.controls		= max9850_controls,
 		.num_controls		= ARRAY_SIZE(max9850_controls),
 		.dapm_widgets		= max9850_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 118/127] ASoC: use component probe/remove on max98357a
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (115 preceding siblings ...)
  2016-08-09  5:42 ` [PATCH 117/127] ASoC: use component probe/remove on max9850 Kuninori Morimoto
@ 2016-08-09  5:42 ` Kuninori Morimoto
  2016-08-09  5:43 ` [PATCH 119/127] ASoC: use component probe/remove on max98095 Kuninori Morimoto
                   ` (9 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98357a.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index 6a6b68a..b321424 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -59,8 +59,9 @@ static const struct snd_soc_dapm_route max98357a_dapm_routes[] = {
 	{"Speaker", NULL, "HiFi Playback"},
 };
 
-static int max98357a_codec_probe(struct snd_soc_codec *codec)
+static int max98357a_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct gpio_desc *sdmode;
 
 	sdmode = devm_gpiod_get_optional(codec->dev, "sdmode", GPIOD_OUT_LOW);
@@ -73,8 +74,8 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver max98357a_codec_driver = {
-	.probe			= max98357a_codec_probe,
 	.component_driver = {
+		.probe			= max98357a_codec_probe,
 		.dapm_widgets		= max98357a_dapm_widgets,
 		.num_dapm_widgets	= ARRAY_SIZE(max98357a_dapm_widgets),
 		.dapm_routes		= max98357a_dapm_routes,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 119/127] ASoC: use component probe/remove on max98095
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (116 preceding siblings ...)
  2016-08-09  5:42 ` [PATCH 118/127] ASoC: use component probe/remove on max98357a Kuninori Morimoto
@ 2016-08-09  5:43 ` Kuninori Morimoto
  2016-08-09  5:43 ` [PATCH 120/127] ASoC: use component probe/remove on max98090 Kuninori Morimoto
                   ` (8 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:43 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98095.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 6f8a757..32ee5ca 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1988,8 +1988,9 @@ static int max98095_reset(struct snd_soc_codec *codec)
 	return ret;
 }
 
-static int max98095_probe(struct snd_soc_codec *codec)
+static int max98095_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
 	struct max98095_cdata *cdata;
 	struct i2c_client *client;
@@ -2088,8 +2089,9 @@ err_access:
 	return ret;
 }
 
-static int max98095_remove(struct snd_soc_codec *codec)
+static void max98095_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
 	struct i2c_client *client = to_i2c_client(codec->dev);
 
@@ -2098,17 +2100,15 @@ static int max98095_remove(struct snd_soc_codec *codec)
 
 	if (client->irq)
 		free_irq(client->irq, codec);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max98095 = {
-	.probe   = max98095_probe,
-	.remove  = max98095_remove,
 	.suspend = max98095_suspend,
 	.resume  = max98095_resume,
 	.set_bias_level = max98095_set_bias_level,
 	.component_driver = {
+		.probe			= max98095_probe,
+		.remove			= max98095_remove,
 		.controls		= max98095_snd_controls,
 		.num_controls		= ARRAY_SIZE(max98095_snd_controls),
 		.dapm_widgets		= max98095_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 120/127] ASoC: use component probe/remove on max98090
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (117 preceding siblings ...)
  2016-08-09  5:43 ` [PATCH 119/127] ASoC: use component probe/remove on max98095 Kuninori Morimoto
@ 2016-08-09  5:43 ` Kuninori Morimoto
  2016-08-09  5:43 ` [PATCH 121/127] ASoC: use component probe/remove on max98088 Kuninori Morimoto
                   ` (7 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:43 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98090.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 584aab8..5bf89c4 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2360,8 +2360,9 @@ static struct snd_soc_dai_driver max98090_dai[] = {
 }
 };
 
-static int max98090_probe(struct snd_soc_codec *codec)
+static int max98090_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
 	struct max98090_cdata *cdata;
 	enum max98090_type devtype;
@@ -2470,8 +2471,9 @@ err_access:
 	return ret;
 }
 
-static int max98090_remove(struct snd_soc_codec *codec)
+static void max98090_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
 
 	cancel_delayed_work_sync(&max98090->jack_work);
@@ -2479,8 +2481,6 @@ static int max98090_remove(struct snd_soc_codec *codec)
 	cancel_work_sync(&max98090->pll_det_disable_work);
 	cancel_work_sync(&max98090->pll_work);
 	max98090->codec = NULL;
-
-	return 0;
 }
 
 static void max98090_seq_notifier(struct snd_soc_dapm_context *dapm,
@@ -2500,10 +2500,12 @@ static void max98090_seq_notifier(struct snd_soc_dapm_context *dapm,
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max98090 = {
-	.probe   = max98090_probe,
-	.remove  = max98090_remove,
 	.seq_notifier = max98090_seq_notifier,
 	.set_bias_level = max98090_set_bias_level,
+	.component_driver = {
+		.probe			= max98090_probe,
+		.remove			= max98090_remove,
+	},
 };
 
 static const struct regmap_config max98090_regmap = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 121/127] ASoC: use component probe/remove on max98088
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (118 preceding siblings ...)
  2016-08-09  5:43 ` [PATCH 120/127] ASoC: use component probe/remove on max98090 Kuninori Morimoto
@ 2016-08-09  5:43 ` Kuninori Morimoto
  2016-08-09  5:44 ` [PATCH 122/127] ASoC: use component probe/remove on jz4740 Kuninori Morimoto
                   ` (6 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:43 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/max98088.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 72f7745..4e992c2 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1628,8 +1628,9 @@ static void max98088_handle_pdata(struct snd_soc_codec *codec)
                max98088_handle_eq_pdata(codec);
 }
 
-static int max98088_probe(struct snd_soc_codec *codec)
+static int max98088_probe(struct snd_soc_component *component)
 {
+       struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
        struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
        struct max98088_cdata *cdata;
        int ret = 0;
@@ -1689,22 +1690,21 @@ err_access:
        return ret;
 }
 
-static int max98088_remove(struct snd_soc_codec *codec)
+static void max98088_remove(struct snd_soc_component *component)
 {
+       struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
        struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
 
        kfree(max98088->eq_texts);
-
-       return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max98088 = {
-	.probe   = max98088_probe,
-	.remove  = max98088_remove,
 	.set_bias_level = max98088_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= max98088_probe,
+		.remove			= max98088_remove,
 		.controls		= max98088_snd_controls,
 		.num_controls		= ARRAY_SIZE(max98088_snd_controls),
 		.dapm_widgets		= max98088_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 122/127] ASoC: use component probe/remove on jz4740
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (119 preceding siblings ...)
  2016-08-09  5:43 ` [PATCH 121/127] ASoC: use component probe/remove on max98088 Kuninori Morimoto
@ 2016-08-09  5:44 ` Kuninori Morimoto
  2016-08-09  5:44 ` [PATCH 123/127] ASoC: use component probe/remove on hdac_hdmi Kuninori Morimoto
                   ` (5 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:44 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/jz4740.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index 0290fab..8891bcd 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -283,8 +283,9 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
+static int jz4740_codec_dev_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(codec);
 
 	regmap_update_bits(jz4740_codec->regmap, JZ4740_REG_CODEC_1,
@@ -294,11 +295,11 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = {
-	.probe = jz4740_codec_dev_probe,
 	.set_bias_level = jz4740_codec_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= jz4740_codec_dev_probe,
 		.controls		= jz4740_codec_controls,
 		.num_controls		= ARRAY_SIZE(jz4740_codec_controls),
 		.dapm_widgets		= jz4740_codec_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 123/127] ASoC: use component probe/remove on hdac_hdmi
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (120 preceding siblings ...)
  2016-08-09  5:44 ` [PATCH 122/127] ASoC: use component probe/remove on jz4740 Kuninori Morimoto
@ 2016-08-09  5:44 ` Kuninori Morimoto
  2016-08-09  5:44 ` [PATCH 124/127] ASoC: use component probe/remove on da9055 Kuninori Morimoto
                   ` (4 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:44 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/hdac_hdmi.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 4e181b2..b9d1f5c 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1459,8 +1459,9 @@ int hdac_hdmi_jack_init(struct snd_soc_dai *dai, int device)
 }
 EXPORT_SYMBOL_GPL(hdac_hdmi_jack_init);
 
-static int hdmi_codec_probe(struct snd_soc_codec *codec)
+static int hdmi_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct hdac_ext_device *edev = snd_soc_codec_get_drvdata(codec);
 	struct hdac_hdmi_priv *hdmi = edev->private_data;
 	struct snd_soc_dapm_context *dapm =
@@ -1512,12 +1513,12 @@ static int hdmi_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int hdmi_codec_remove(struct snd_soc_codec *codec)
+static void hdmi_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct hdac_ext_device *edev = snd_soc_codec_get_drvdata(codec);
 
 	pm_runtime_disable(&edev->hdac.dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1571,9 +1572,11 @@ static void hdmi_codec_complete(struct device *dev)
 #endif
 
 static struct snd_soc_codec_driver hdmi_hda_codec = {
-	.probe		= hdmi_codec_probe,
-	.remove		= hdmi_codec_remove,
 	.idle_bias_off	= true,
+	.component_driver = {
+		.probe		= hdmi_codec_probe,
+		.remove		= hdmi_codec_remove,
+	},
 };
 
 static void hdac_hdmi_get_chmap(struct hdac_device *hdac, int pcm_idx,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 124/127] ASoC: use component probe/remove on da9055
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (121 preceding siblings ...)
  2016-08-09  5:44 ` [PATCH 123/127] ASoC: use component probe/remove on hdac_hdmi Kuninori Morimoto
@ 2016-08-09  5:44 ` Kuninori Morimoto
  2016-08-09  5:45 ` [PATCH 125/127] ASoC: use component probe/remove on da7219 Kuninori Morimoto
                   ` (3 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:44 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/da9055.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index 4efb5f8..c52c67edd 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -1377,8 +1377,9 @@ static int da9055_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-static int da9055_probe(struct snd_soc_codec *codec)
+static int da9055_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da9055_priv *da9055 = snd_soc_codec_get_drvdata(codec);
 
 	/* Enable all Gain Ramps */
@@ -1452,10 +1453,10 @@ static int da9055_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_da9055 = {
-	.probe			= da9055_probe,
 	.set_bias_level		= da9055_set_bias_level,
 
 	.component_driver = {
+		.probe			= da9055_probe,
 		.controls		= da9055_snd_controls,
 		.num_controls		= ARRAY_SIZE(da9055_snd_controls),
 		.dapm_widgets		= da9055_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 125/127] ASoC: use component probe/remove on da7219
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (122 preceding siblings ...)
  2016-08-09  5:44 ` [PATCH 124/127] ASoC: use component probe/remove on da9055 Kuninori Morimoto
@ 2016-08-09  5:45 ` Kuninori Morimoto
  2016-08-09  5:45 ` [PATCH 126/127] ASoC: use component probe/remove on da7218 Kuninori Morimoto
                   ` (2 subsequent siblings)
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:45 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/da7219.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index b6411bd..31cf5e8 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1630,8 +1630,9 @@ static struct reg_sequence da7219_rev_aa_patch[] = {
 	{ DA7219_REFERENCES, 0x08 },
 };
 
-static int da7219_probe(struct snd_soc_codec *codec)
+static int da7219_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec);
 	unsigned int rev;
 	int ret;
@@ -1718,14 +1719,15 @@ err_disable_reg:
 	return ret;
 }
 
-static int da7219_remove(struct snd_soc_codec *codec)
+static void da7219_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec);
 
 	da7219_aad_exit(codec);
 
 	/* Supplies */
-	return regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies);
+	regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies);
 }
 
 #ifdef CONFIG_PM
@@ -1761,13 +1763,13 @@ static int da7219_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_da7219 = {
-	.probe			= da7219_probe,
-	.remove			= da7219_remove,
 	.suspend		= da7219_suspend,
 	.resume			= da7219_resume,
 	.set_bias_level		= da7219_set_bias_level,
 
 	.component_driver = {
+		.probe			= da7219_probe,
+		.remove			= da7219_remove,
 		.controls		= da7219_snd_controls,
 		.num_controls		= ARRAY_SIZE(da7219_snd_controls),
 		.dapm_widgets		= da7219_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 126/127] ASoC: use component probe/remove on da7218
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (123 preceding siblings ...)
  2016-08-09  5:45 ` [PATCH 125/127] ASoC: use component probe/remove on da7219 Kuninori Morimoto
@ 2016-08-09  5:45 ` Kuninori Morimoto
  2016-08-09  5:46 ` [PATCH 127/127] ASoC: remove codec duplicated .probe/.remove Kuninori Morimoto
  2016-08-09  7:52 ` [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Lars-Peter Clausen
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:45 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/da7218.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c
index dcdda6c..bbaae56 100644
--- a/sound/soc/codecs/da7218.c
+++ b/sound/soc/codecs/da7218.c
@@ -2885,8 +2885,9 @@ static void da7218_handle_pdata(struct snd_soc_codec *codec)
 	}
 }
 
-static int da7218_probe(struct snd_soc_codec *codec)
+static int da7218_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7218_priv *da7218 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -2997,13 +2998,12 @@ err_disable_reg:
 	return ret;
 }
 
-static int da7218_remove(struct snd_soc_codec *codec)
+static void da7218_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7218_priv *da7218 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(DA7218_NUM_SUPPLIES, da7218->supplies);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -3039,13 +3039,13 @@ static int da7218_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_da7218 = {
-	.probe			= da7218_probe,
-	.remove			= da7218_remove,
 	.suspend		= da7218_suspend,
 	.resume			= da7218_resume,
 	.set_bias_level		= da7218_set_bias_level,
 
 	.component_driver = {
+		.probe			= da7218_probe,
+		.remove			= da7218_remove,
 		.controls		= da7218_snd_controls,
 		.num_controls		= ARRAY_SIZE(da7218_snd_controls),
 		.dapm_widgets		= da7218_dapm_widgets,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* [PATCH 127/127] ASoC: remove codec duplicated .probe/.remove
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (124 preceding siblings ...)
  2016-08-09  5:45 ` [PATCH 126/127] ASoC: use component probe/remove on da7218 Kuninori Morimoto
@ 2016-08-09  5:46 ` Kuninori Morimoto
  2016-08-09  7:52 ` [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Lars-Peter Clausen
  126 siblings, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-09  5:46 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood


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

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch removes codec side .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc.h  |  2 --
 sound/soc/soc-core.c | 18 ------------------
 2 files changed, 20 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 5eb2b38..ee1d361 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -892,8 +892,6 @@ struct snd_soc_codec {
 struct snd_soc_codec_driver {
 
 	/* driver ops */
-	int (*probe)(struct snd_soc_codec *);
-	int (*remove)(struct snd_soc_codec *);
 	int (*suspend)(struct snd_soc_codec *);
 	int (*resume)(struct snd_soc_codec *);
 	struct snd_soc_component_driver component_driver;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index edba975..3e2f0b0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3262,20 +3262,6 @@ static void fixup_codec_formats(struct snd_soc_pcm_stream *stream)
 			stream->formats |= codec_format_map[i];
 }
 
-static int snd_soc_codec_drv_probe(struct snd_soc_component *component)
-{
-	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
-
-	return codec->driver->probe(codec);
-}
-
-static void snd_soc_codec_drv_remove(struct snd_soc_component *component)
-{
-	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
-
-	codec->driver->remove(codec);
-}
-
 static int snd_soc_codec_drv_write(struct snd_soc_component *component,
 	unsigned int reg, unsigned int val)
 {
@@ -3333,10 +3319,6 @@ int snd_soc_register_codec(struct device *dev,
 	if (ret)
 		goto err_free;
 
-	if (codec_drv->probe)
-		codec->component.probe = snd_soc_codec_drv_probe;
-	if (codec_drv->remove)
-		codec->component.remove = snd_soc_codec_drv_remove;
 	if (codec_drv->write)
 		codec->component.write = snd_soc_codec_drv_write;
 	if (codec_drv->read)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
                   ` (125 preceding siblings ...)
  2016-08-09  5:46 ` [PATCH 127/127] ASoC: remove codec duplicated .probe/.remove Kuninori Morimoto
@ 2016-08-09  7:52 ` Lars-Peter Clausen
  2016-08-09 11:26   ` Mark Brown
  126 siblings, 1 reply; 138+ messages in thread
From: Lars-Peter Clausen @ 2016-08-09  7:52 UTC (permalink / raw)
  To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood

On 08/09/2016 06:52 AM, Kuninori Morimoto wrote:
> 
> Hi Mark
> 
> These are codec duplicate functions cleanup patches - v2
> We would like to switch to "component" style base ASoC in the future
> instead of current "CPU/Codec/Platform/Card" style.
> 
> Current "codec" has its .probe/.remove, and "component" has it too.
> codec side is just relayed it to component side.
> This is the time to cleanup.

While for the widgets, routes and controls it did not really matter, I do
not think this is the right approach for probe and remove.

This is kind of sub-classing a normal design pattern found all throughout
the kernel. You have a generic callback function and a specialized callback
function that takes the type of the object that is being worked on rather
than the generic object type.

Especially done as a blind mechanical conversion like you did this is not a
cleanup. Most probe functions do not actually need to know that they work on
a CODEC.

E.g. you now have very often this kind of code:

    struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
    struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);

This could easily be replaced with

    struct tas5086_private *priv = snd_soc_component_get_drvdata(component);

But again, this indirection is not the problem we currently have with ASoC
and it's layering. This kind of cleanup should be done as a very final step
when all other CODEC specific elements have been removed from the driver.

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-09  7:52 ` [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Lars-Peter Clausen
@ 2016-08-09 11:26   ` Mark Brown
  2016-08-10  0:31     ` Kuninori Morimoto
  0 siblings, 1 reply; 138+ messages in thread
From: Mark Brown @ 2016-08-09 11:26 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto


[-- Attachment #1.1: Type: text/plain, Size: 1807 bytes --]

On Tue, Aug 09, 2016 at 09:52:48AM +0200, Lars-Peter Clausen wrote:
> On 08/09/2016 06:52 AM, Kuninori Morimoto wrote:

> > Current "codec" has its .probe/.remove, and "component" has it too.
> > codec side is just relayed it to component side.
> > This is the time to cleanup.

> While for the widgets, routes and controls it did not really matter, I do
> not think this is the right approach for probe and remove.

> This is kind of sub-classing a normal design pattern found all throughout
> the kernel. You have a generic callback function and a specialized callback
> function that takes the type of the object that is being worked on rather
> than the generic object type.

I tend to agree here - look at struct device_driver for example, it has
a bunch of callbacks that are in practice rarely used because each
subsystem defines subsystem specific versions that are going to be much
more appropriate for most drivers.  This sort of refactoring tends to
make more sense when it's done with pure data (as for your previous
series).

> 
> Especially done as a blind mechanical conversion like you did this is not a
> cleanup. Most probe functions do not actually need to know that they work on
> a CODEC.
> 
> E.g. you now have very often this kind of code:
> 
>     struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
>     struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
> 
> This could easily be replaced with
> 
>     struct tas5086_private *priv = snd_soc_component_get_drvdata(component);
> 
> But again, this indirection is not the problem we currently have with ASoC
> and it's layering. This kind of cleanup should be done as a very final step
> when all other CODEC specific elements have been removed from the driver.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-09 11:26   ` Mark Brown
@ 2016-08-10  0:31     ` Kuninori Morimoto
  2016-08-10 11:17       ` Mark Brown
  0 siblings, 1 reply; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-10  0:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Lars-Peter Clausen, Liam Girdwood, Simon


Hi Lars, Mark

> > > Current "codec" has its .probe/.remove, and "component" has it too.
> > > codec side is just relayed it to component side.
> > > This is the time to cleanup.
> 
> > While for the widgets, routes and controls it did not really matter, I do
> > not think this is the right approach for probe and remove.
> 
> > This is kind of sub-classing a normal design pattern found all throughout
> > the kernel. You have a generic callback function and a specialized callback
> > function that takes the type of the object that is being worked on rather
> > than the generic object type.
> 
> I tend to agree here - look at struct device_driver for example, it has
> a bunch of callbacks that are in practice rarely used because each
> subsystem defines subsystem specific versions that are going to be much
> more appropriate for most drivers.  This sort of refactoring tends to
> make more sense when it's done with pure data (as for your previous
> series).

Thank you for your feedback.
My understanding is that current "codec" is already part of "component",
and new ASoC controls "component" only.
This means, if we switches to new ASoC style, it can't call "codec"
side callback ?
Indeed my patch-set is using/keeping "codec" pointer, but it is each driver's
matter, ASoC framework side doesn't care about it.
This is my understanding.
 - ASoC will care only "component"
 - driver can use "codec" which is part of "component"
 - "Platform", "CPU" etc use same style (= component base).
This case, we can keep using current "codec" struct without big change.

But it seems your opinion is like this ?
 - ASoC will care only "component" (same as my opinion)
 - This "component" includes all features
   (= Codec feature, CPU feature, Platform feature, etc)

Anyway, I don't want to create new issue on ASoC.
It seems we (or only me ?) still don't have cristal clear big-picture (?)
If so, my previous patch-set might make new style switching difficult.
Mark, because of this reasons, is it possible to remove my previous
patch-set (= topic/codec-component) from your repository ?
Incomplete big-patch-set will cause new trouble.
I want to cleanup ASoC, but I want to do it under cristal clear agreement.

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-10  0:31     ` Kuninori Morimoto
@ 2016-08-10 11:17       ` Mark Brown
  2016-08-11  1:03         ` Kuninori Morimoto
  0 siblings, 1 reply; 138+ messages in thread
From: Mark Brown @ 2016-08-10 11:17 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Lars-Peter Clausen, Liam Girdwood, Simon


[-- Attachment #1.1: Type: text/plain, Size: 1794 bytes --]

On Wed, Aug 10, 2016 at 12:31:29AM +0000, Kuninori Morimoto wrote:

> My understanding is that current "codec" is already part of "component",
> and new ASoC controls "component" only.
> This means, if we switches to new ASoC style, it can't call "codec"
> side callback ?
> Indeed my patch-set is using/keeping "codec" pointer, but it is each driver's
> matter, ASoC framework side doesn't care about it.

If something is only using the component interfaces except for things
like probe and remove then converting them to component interfaces makes
sense.  If it's still using CODEC interfaces for some bits then it's
less clear that this is a good idea.

> But it seems your opinion is like this ?
>  - ASoC will care only "component" (same as my opinion)
>  - This "component" includes all features
>    (= Codec feature, CPU feature, Platform feature, etc)

I think so, yes.  To me the goal is to avoid too much rigid
categorization of components so that we can handle devices that have
combinations of these features effectively without having to worry about
exactly what terminology we use to describe them.

> Anyway, I don't want to create new issue on ASoC.
> It seems we (or only me ?) still don't have cristal clear big-picture (?)
> If so, my previous patch-set might make new style switching difficult.
> Mark, because of this reasons, is it possible to remove my previous
> patch-set (= topic/codec-component) from your repository ?
> Incomplete big-patch-set will cause new trouble.
> I want to cleanup ASoC, but I want to do it under cristal clear agreement.

I think that's a reasonable thing to do in general, I don't see a
particular need to revert it.  Like Lars said I probably wouldn't have
done it right now but you've done the work so I don't see any need to
revert it.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-10 11:17       ` Mark Brown
@ 2016-08-11  1:03         ` Kuninori Morimoto
  2016-08-11 17:07           ` Mark Brown
  2016-08-11 17:44           ` Lars-Peter Clausen
  0 siblings, 2 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-11  1:03 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Lars-Peter Clausen, Liam Girdwood, Simon


Hi Mark

> If something is only using the component interfaces except for things
> like probe and remove then converting them to component interfaces makes
> sense.  If it's still using CODEC interfaces for some bits then it's
> less clear that this is a good idea.
> 
> > But it seems your opinion is like this ?
> >  - ASoC will care only "component" (same as my opinion)
> >  - This "component" includes all features
> >    (= Codec feature, CPU feature, Platform feature, etc)
> 
> I think so, yes.  To me the goal is to avoid too much rigid
> categorization of components so that we can handle devices that have
> combinations of these features effectively without having to worry about
> exactly what terminology we use to describe them.

Hmm... If my understand was correct, my concern is this.
If we merged all (CPU/Codec/Platform/etc...) features into component,
it will be big size, and almost all feature are not needed for almost all devices.
And in the future, we will have new type of device which we never know yet today.
In such case, more new feature (it is unnecessary for existing devices) will be
added to component. Then it will be bigger and bigger and bigger...

My opinion is that "component" which will be base of new ASoC should keep simple and small.
New "component" has "each connection", and "callback" for each necessary point,
and very basic feature only (like format, channel, etc)
And each device struct which is based on component can have detail information if it wants.
But here, ASoC cares component only. If framework need to do something for detail
things, it should be done by callback.

This doesn't mean "categorization". Of course current CPU/Codec/Platform looks
like one of them, but I would like to say it will be "helper".
Current "Codec" specific operation can go to "codec struct" specific callback,
and ASoC framework doesn't care about it, it just call generic callback.
This means soc-core will have "component" related operation only,
and new soc-codec.c will have codec related operation as callback, for example.

> > Anyway, I don't want to create new issue on ASoC.
> > It seems we (or only me ?) still don't have cristal clear big-picture (?)
> > If so, my previous patch-set might make new style switching difficult.
> > Mark, because of this reasons, is it possible to remove my previous
> > patch-set (= topic/codec-component) from your repository ?
> > Incomplete big-patch-set will cause new trouble.
> > I want to cleanup ASoC, but I want to do it under cristal clear agreement.
> 
> I think that's a reasonable thing to do in general, I don't see a
> particular need to revert it.  Like Lars said I probably wouldn't have
> done it right now but you've done the work so I don't see any need to
> revert it.

According to your (and Lars ?) idea, if component includes all features,
then, current "codec" will be "component", and "platform" will be "component" too (?).
If so, I think necessary patch in final stage is like this ?

	- static struct snd_soc_codec_driver xxxx = {
	+ static struct snd_soc_component_driver xxxx = {

If so my previous patch is doing pointless effort, and will be trouble ?

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-11  1:03         ` Kuninori Morimoto
@ 2016-08-11 17:07           ` Mark Brown
  2016-08-11 17:44           ` Lars-Peter Clausen
  1 sibling, 0 replies; 138+ messages in thread
From: Mark Brown @ 2016-08-11 17:07 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Lars-Peter Clausen, Liam Girdwood, Simon


[-- Attachment #1.1: Type: text/plain, Size: 1227 bytes --]

On Thu, Aug 11, 2016 at 01:03:05AM +0000, Kuninori Morimoto wrote:

> Hmm... If my understand was correct, my concern is this.
> If we merged all (CPU/Codec/Platform/etc...) features into component,
> it will be big size, and almost all feature are not needed for almost all devices.

If there are concrete issues we can look at them but let's do that when
they arise rather than early on.  We do currently have devices that span
all classes (CODECs that take audio streams in through their register
maps, SoCs with built in CODECS...) so there definitely are devices that
need the overlap.

> According to your (and Lars ?) idea, if component includes all features,
> then, current "codec" will be "component", and "platform" will be "component" too (?).
> If so, I think necessary patch in final stage is like this ?

> 	- static struct snd_soc_codec_driver xxxx = {
> 	+ static struct snd_soc_component_driver xxxx = {

That's the goal.

> If so my previous patch is doing pointless effort, and will be trouble ?

I'd more say it's premature at this point, it's something that should be
done for each driver once it is converted to not need anything that's
CODEC specific rather than something that should be done early on.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-11  1:03         ` Kuninori Morimoto
  2016-08-11 17:07           ` Mark Brown
@ 2016-08-11 17:44           ` Lars-Peter Clausen
  2016-08-12  1:27             ` Kuninori Morimoto
  1 sibling, 1 reply; 138+ messages in thread
From: Lars-Peter Clausen @ 2016-08-11 17:44 UTC (permalink / raw)
  To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood

On 08/11/2016 03:03 AM, Kuninori Morimoto wrote:
> 
> Hi Mark
> 
>> If something is only using the component interfaces except for things
>> like probe and remove then converting them to component interfaces makes
>> sense.  If it's still using CODEC interfaces for some bits then it's
>> less clear that this is a good idea.
>>
>>> But it seems your opinion is like this ?
>>>  - ASoC will care only "component" (same as my opinion)
>>>  - This "component" includes all features
>>>    (= Codec feature, CPU feature, Platform feature, etc)
>>
>> I think so, yes.  To me the goal is to avoid too much rigid
>> categorization of components so that we can handle devices that have
>> combinations of these features effectively without having to worry about
>> exactly what terminology we use to describe them.
> 
> Hmm... If my understand was correct, my concern is this.
> If we merged all (CPU/Codec/Platform/etc...) features into component,
> it will be big size, and almost all feature are not needed for almost all devices.
> And in the future, we will have new type of device which we never know yet today.
> In such case, more new feature (it is unnecessary for existing devices) will be
> added to component. Then it will be bigger and bigger and bigger...

I don't quite share this concern and would even say the opposite is true.
When ASoC was introduced the (embedded audio) world was a lot simpler. There
was a clear distinction between what a CODEC, what a CPU side component and
what a platform is. Each of them had distinct roles which were reflected in
the code base.

Over time the hardware landscape changed and the distinction feature wise
did become smaller between the different types of components. The CPU side
components started to take care of tasks that were previously only found in
CODECS and wise versa.

This lead to a lot of code duplication in ASoC since the same functionality
was now implemented multiple times. Is this where the original
componentization effort started. The goal of this effort was to introduce
the snd_soc_component struct as a common base for all types of components in
ASoC. This allowed us to remove a lot of duplicated code and also reduce
struct sizes by implementing a more strict hierarchy.

If you look at snd_soc_codec and snd_soc_platform today you'll see that most
of the additional fields in there are for supporting legacy features. These
will not be moved over into snd_soc_component but will be phased out over
time once there are no users anymore. If you look at the componetization
patches you'll see that as part of that process already a lot of fields that
were originally in these structs have been removed reducing the overall
memory consumption of ASoC.

There is no intention to make snd_soc_component bloated. If a new kind of
component gets introduced which as very distinct features that are not found
in other kinds of components we can introduce a new sub-struct of
snd_soc_component to model that type. But the current hardware trends are
going in a different direction, as silicon gets cheaper, individual
components cover a wider feature set and which features are used in a
particular instance are application and hardware design dependent.

> 
> My opinion is that "component" which will be base of new ASoC should keep simple and small.
> New "component" has "each connection", and "callback" for each necessary point,
> and very basic feature only (like format, channel, etc)
> And each device struct which is based on component can have detail information if it wants.
> But here, ASoC cares component only. If framework need to do something for detail
> things, it should be done by callback.

I fully agree with this. snd_soc_component should provide the basic feature
set that is required by all components.

> 
> This doesn't mean "categorization". Of course current CPU/Codec/Platform looks
> like one of them, but I would like to say it will be "helper".
> Current "Codec" specific operation can go to "codec struct" specific callback,
> and ASoC framework doesn't care about it, it just call generic callback.
> This means soc-core will have "component" related operation only,
> and new soc-codec.c will have codec related operation as callback, for example.
> 

Agreed again. But the change you were making in this patch series was
affecting the CODEC layer, not the component layer. The CODEC layer is a
layer that is abstracted on top of the component layer, but in this series
you were removing part of that abstraction.

>>> Anyway, I don't want to create new issue on ASoC.
>>> It seems we (or only me ?) still don't have cristal clear big-picture (?)
>>> If so, my previous patch-set might make new style switching difficult.
>>> Mark, because of this reasons, is it possible to remove my previous
>>> patch-set (= topic/codec-component) from your repository ?
>>> Incomplete big-patch-set will cause new trouble.
>>> I want to cleanup ASoC, but I want to do it under cristal clear agreement.
>>
>> I think that's a reasonable thing to do in general, I don't see a
>> particular need to revert it.  Like Lars said I probably wouldn't have
>> done it right now but you've done the work so I don't see any need to
>> revert it.
> 
> According to your (and Lars ?) idea, if component includes all features,
> then, current "codec" will be "component", and "platform" will be "component" too (?).
> If so, I think necessary patch in final stage is like this ?
> 
> 	- static struct snd_soc_codec_driver xxxx = {
> 	+ static struct snd_soc_component_driver xxxx = {

In the long run probably yes, with the distinction of particular features
happening at a different level. E.g. like I pointed out in one of the
earlier e-mails, one such layer could be the domain and bridge layer were a
component is subdivided into domains and bridges.

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-11 17:44           ` Lars-Peter Clausen
@ 2016-08-12  1:27             ` Kuninori Morimoto
  2016-08-12  9:33               ` Lars-Peter Clausen
  0 siblings, 1 reply; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-12  1:27 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon


Hi Mark, Lars

> Over time the hardware landscape changed and the distinction feature wise
> did become smaller between the different types of components. The CPU side
> components started to take care of tasks that were previously only found in
> CODECS and wise versa.
> 
> This lead to a lot of code duplication in ASoC since the same functionality
> was now implemented multiple times. Is this where the original
> componentization effort started. The goal of this effort was to introduce
> the snd_soc_component struct as a common base for all types of components in
> ASoC. This allowed us to remove a lot of duplicated code and also reduce
> struct sizes by implementing a more strict hierarchy.

Ahh... I see...
OK, I could understand.

> > According to your (and Lars ?) idea, if component includes all features,
> > then, current "codec" will be "component", and "platform" will be "component" too (?).
> > If so, I think necessary patch in final stage is like this ?
> > 
> > 	- static struct snd_soc_codec_driver xxxx = {
> > 	+ static struct snd_soc_component_driver xxxx = {
> 
> In the long run probably yes, with the distinction of particular features
> happening at a different level. E.g. like I pointed out in one of the
> earlier e-mails, one such layer could be the domain and bridge layer were a
> component is subdivided into domains and bridges.

If my understanding was correct,
current CPU/Codec/Platform will merged and goes to your "component" position.
current snd_soc_dai will be cleanuped and goes to your "bridge" position.
Are these correct ?
But I wonder current which portion is the "domain" position ?
("domain" + "bridge" = current snd_soc_dai ?)
Or we don't have such position at this point ?

BTW, I would like to replace below as next challenge.
These are easy, and necessary.
	snd_soc_write()		-> snd_soc_component_write()
	snd_soc_update_bits()	-> snd_soc_component_update_bits()

This is a little bit difficult, but I can do is step-by-step.
	snd_soc_read()		-> snd_soc_component_read()

If above were OK, some codec driver can use component side .probe/.remove
I think Lars's opinion is that this should be final stage,
but I think we can do this as parallel, and I like step-by-step approach.
Of course I can skip it if you have strong objection.
So please let me know.
I will have summer vacation from tomorrow, so I can start it after that.

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-12  1:27             ` Kuninori Morimoto
@ 2016-08-12  9:33               ` Lars-Peter Clausen
  2016-08-12 10:22                 ` Mark Brown
  2016-08-22  2:15                 ` Kuninori Morimoto
  0 siblings, 2 replies; 138+ messages in thread
From: Lars-Peter Clausen @ 2016-08-12  9:33 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon

On 08/12/2016 03:27 AM, Kuninori Morimoto wrote:
[...]
>>> According to your (and Lars ?) idea, if component includes all features,
>>> then, current "codec" will be "component", and "platform" will be "component" too (?).
>>> If so, I think necessary patch in final stage is like this ?
>>>
>>> 	- static struct snd_soc_codec_driver xxxx = {
>>> 	+ static struct snd_soc_component_driver xxxx = {
>>
>> In the long run probably yes, with the distinction of particular features
>> happening at a different level. E.g. like I pointed out in one of the
>> earlier e-mails, one such layer could be the domain and bridge layer were a
>> component is subdivided into domains and bridges.
> 
> If my understanding was correct,
> current CPU/Codec/Platform will merged and goes to your "component" position.
> current snd_soc_dai will be cleanuped and goes to your "bridge" position.
> Are these correct ?

The domain+bridge concept is currently just an idea, it still needs somebody
to implement it before it becomes reality.

> But I wonder current which portion is the "domain" position ?
> ("domain" + "bridge" = current snd_soc_dai ?)
> Or we don't have such position at this point ?

At the moment there is nothing that translates well to the domain+bridge
concept since we only have single domain, so all components and functional
blocks all run in the same domain and there are no bridges.

> 
> BTW, I would like to replace below as next challenge.
> These are easy, and necessary.
> 	snd_soc_write()		-> snd_soc_component_write()
> 	snd_soc_update_bits()	-> snd_soc_component_update_bits()
> 
> This is a little bit difficult, but I can do is step-by-step.
> 	snd_soc_read()		-> snd_soc_component_read()

How do you want to replace them?

snd_soc_read() is placed at the CODEC layer and snd_soc_component_read() is
placed at the component layer. As long as the driver is a CODEC driver
(using snd_soc_register_codec()) it is OK that it uses snd_soc_read() and
similar. Using snd_soc_component_read() on the other hand would introduce
some slight boilerplate code, since the driver now has to cast from
snd_soc_codec to snd_soc_component.

snd_soc_read() and similar are part of a clear hierarchy and are not part of
the current problem. Removing them is not a priority and changing them to
snd_soc_component_read() should only be done where it makes sense (driver is
a component driver and uses snd_soc_register_component()).

The problems are where we break the hierarchy, e.g. the codec point in
snd_soc_component. This is something we should try to work towards removing
and fixing if we can.

> 
> If above were OK, some codec driver can use component side .probe/.remove
> I think Lars's opinion is that this should be final stage,
> but I think we can do this as parallel, and I like step-by-step approach.
> Of course I can skip it if you have strong objection.

I think we should wait with this until a driver is a component driver (uses
snd_soc_register_component). E.g. have a look at this commit [1] for a good
example where it makes sense to do the conversion.

[1]
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=04b5cbd80af899c6a4d51835b069b96ae8864e5a

> So please let me know.
> I will have summer vacation from tomorrow, so I can start it after that.

Enjoy your vacation.

^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-12  9:33               ` Lars-Peter Clausen
@ 2016-08-12 10:22                 ` Mark Brown
  2016-08-22  2:15                 ` Kuninori Morimoto
  1 sibling, 0 replies; 138+ messages in thread
From: Mark Brown @ 2016-08-12 10:22 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto


[-- Attachment #1.1: Type: text/plain, Size: 488 bytes --]

On Fri, Aug 12, 2016 at 11:33:13AM +0200, Lars-Peter Clausen wrote:

> snd_soc_read() and similar are part of a clear hierarchy and are not part of
> the current problem. Removing them is not a priority and changing them to
> snd_soc_component_read() should only be done where it makes sense (driver is
> a component driver and uses snd_soc_register_component()).

There is some argument for renaming them to snd_soc_codec_read() and so
on but it's really not worth the hassle and churn.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 138+ messages in thread

* Re: [PATCH 000/127] ASoC: codec cleanup - codec probe/remove
  2016-08-12  9:33               ` Lars-Peter Clausen
  2016-08-12 10:22                 ` Mark Brown
@ 2016-08-22  2:15                 ` Kuninori Morimoto
  1 sibling, 0 replies; 138+ messages in thread
From: Kuninori Morimoto @ 2016-08-22  2:15 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon


Hi Lars

> > If my understanding was correct,
> > current CPU/Codec/Platform will merged and goes to your "component" position.
> > current snd_soc_dai will be cleanuped and goes to your "bridge" position.
> > Are these correct ?
> 
> The domain+bridge concept is currently just an idea, it still needs somebody
> to implement it before it becomes reality.

OK I see

> > BTW, I would like to replace below as next challenge.
> > These are easy, and necessary.
> > 	snd_soc_write()		-> snd_soc_component_write()
> > 	snd_soc_update_bits()	-> snd_soc_component_update_bits()
> > 
> > This is a little bit difficult, but I can do is step-by-step.
> > 	snd_soc_read()		-> snd_soc_component_read()
> 
> How do you want to replace them?
> 
> snd_soc_read() is placed at the CODEC layer and snd_soc_component_read() is
> placed at the component layer. As long as the driver is a CODEC driver
> (using snd_soc_register_codec()) it is OK that it uses snd_soc_read() and
> similar. Using snd_soc_component_read() on the other hand would introduce
> some slight boilerplate code, since the driver now has to cast from
> snd_soc_codec to snd_soc_component.
> 
> snd_soc_read() and similar are part of a clear hierarchy and are not part of
> the current problem. Removing them is not a priority and changing them to
> snd_soc_component_read() should only be done where it makes sense (driver is
> a component driver and uses snd_soc_register_component()).
> 
> The problems are where we break the hierarchy, e.g. the codec point in
> snd_soc_component. This is something we should try to work towards removing
> and fixing if we can.

Ahh.. your indicated sample is changing
 - function parameter "codec" to "component"
 - snd_soc_write() to regmap_write()
 - snd_soc_add_codec_controls() to snd_soc_add_component_controls()
 - snd_soc_register_codec() to devm_snd_soc_register_component()

If my understanding is correct, your opinion is you want change
"codec" to "component" by 1 patch ?
In this sample case, my opinion was we need 3 or 4 patches.
I don't know which is good idea, but I like low-risk conversion.

^ permalink raw reply	[flat|nested] 138+ messages in thread

end of thread, other threads:[~2016-08-22  2:15 UTC | newest]

Thread overview: 138+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09  4:52 [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Kuninori Morimoto
2016-08-09  4:53 ` [PATCH 001/127] ASoC: use component probe/remove on tas5086 Kuninori Morimoto
2016-08-09  4:53 ` [PATCH 002/127] ASoC: use component probe/remove on pistachio-internal-dac Kuninori Morimoto
2016-08-09  4:54 ` [PATCH 003/127] ASoC: use component probe/remove on wm8985 Kuninori Morimoto
2016-08-09  4:54 ` [PATCH 004/127] ASoC: use component probe/remove on wm8978 Kuninori Morimoto
2016-08-09  4:55 ` [PATCH 005/127] ASoC: use component probe/remove on wm8974 Kuninori Morimoto
2016-08-09  4:55 ` [PATCH 006/127] ASoC: use component probe/remove on wm8962 Kuninori Morimoto
2016-08-09  4:55 ` [PATCH 025/127] ASoC: use component probe/remove on sta32x Kuninori Morimoto
2016-08-09  4:56 ` [PATCH 007/127] ASoC: use component probe/remove on wm8960 Kuninori Morimoto
2016-08-09  4:56 ` [PATCH 008/127] ASoC: use component probe/remove on wm8776 Kuninori Morimoto
2016-08-09  4:56 ` [PATCH 009/127] ASoC: use component probe/remove on wm8770 Kuninori Morimoto
2016-08-09  4:57 ` [PATCH 010/127] ASoC: use component probe/remove on wm8753 Kuninori Morimoto
2016-08-09  4:57 ` [PATCH 011/127] ASoC: use component probe/remove on wm8750 Kuninori Morimoto
2016-08-09  4:58 ` [PATCH 012/127] ASoC: use component probe/remove on wm8741 Kuninori Morimoto
2016-08-09  4:58 ` [PATCH 013/127] ASoC: use component probe/remove on wm8737 Kuninori Morimoto
2016-08-09  4:58 ` [PATCH 014/127] ASoC: use component probe/remove on wm8711 Kuninori Morimoto
2016-08-09  4:59 ` [PATCH 015/127] ASoC: use component probe/remove on wm8580 Kuninori Morimoto
2016-08-09  4:59 ` [PATCH 016/127] ASoC: use component probe/remove on wm8523 Kuninori Morimoto
2016-08-09  5:00 ` [PATCH 017/127] ASoC: use component probe/remove on wm8510 Kuninori Morimoto
2016-08-09  5:00 ` [PATCH 018/127] ASoC: use component probe/remove on tlv320aic3x Kuninori Morimoto
2016-08-09  5:00 ` [PATCH 019/127] ASoC: use component probe/remove on tlv320aic31xx Kuninori Morimoto
2016-08-09  5:01 ` [PATCH 020/127] ASoC: use component probe/remove on tlv320aic23 Kuninori Morimoto
2016-08-09  5:01 ` [PATCH 021/127] ASoC: use component probe/remove on tas5720 Kuninori Morimoto
2016-08-09  5:02 ` [PATCH 022/127] ASoC: use component probe/remove on tas2552 Kuninori Morimoto
2016-08-09  5:02 ` [PATCH 023/127] ASoC: use component probe/remove on sti-sas Kuninori Morimoto
2016-08-09  5:03 ` [PATCH 024/127] ASoC: use component probe/remove on sta350 Kuninori Morimoto
2016-08-09  5:04 ` [PATCH 026/127] ASoC: use component probe/remove on ssm2602 Kuninori Morimoto
2016-08-09  5:05 ` [PATCH 027/127] ASoC: use component probe/remove on sgtl5000 Kuninori Morimoto
2016-08-09  5:06 ` [PATCH 028/127] ASoC: use component probe/remove on rt5631 Kuninori Morimoto
2016-08-09  5:06 ` [PATCH 029/127] ASoC: use component probe/remove on rt5616 Kuninori Morimoto
2016-08-09  5:07 ` [PATCH 030/127] ASoC: use component probe/remove on inno_rk3036 Kuninori Morimoto
2016-08-09  5:07 ` [PATCH 031/127] ASoC: use component probe/remove on es8328 Kuninori Morimoto
2016-08-09  5:08 ` [PATCH 032/127] ASoC: use component probe/remove on cs53l30 Kuninori Morimoto
2016-08-09  5:08 ` [PATCH 033/127] ASoC: use component probe/remove on cs42xx8 Kuninori Morimoto
2016-08-09  5:08 ` [PATCH 034/127] ASoC: use component probe/remove on cs42l73 Kuninori Morimoto
2016-08-09  5:09 ` [PATCH 035/127] ASoC: use component probe/remove on cs42l56 Kuninori Morimoto
2016-08-09  5:09 ` [PATCH 036/127] ASoC: use component probe/remove on cs42l52 Kuninori Morimoto
2016-08-09  5:10 ` [PATCH 037/127] ASoC: use component probe/remove on cs42l51 Kuninori Morimoto
2016-08-09  5:10 ` [PATCH 038/127] ASoC: use component probe/remove on cs4271 Kuninori Morimoto
2016-08-09  5:11 ` [PATCH 039/127] ASoC: use component probe/remove on cs4270 Kuninori Morimoto
2016-08-09  5:12 ` [PATCH 040/127] ASoC: use component probe/remove on cs35l33 Kuninori Morimoto
2016-08-09  5:12 ` [PATCH 041/127] ASoC: use component probe/remove on alc5623 Kuninori Morimoto
2016-08-09  5:12 ` [PATCH 042/127] ASoC: use component probe/remove on ak5386 Kuninori Morimoto
2016-08-09  5:13 ` [PATCH 043/127] ASoC: use component probe/remove on ak4642 Kuninori Morimoto
2016-08-09  5:13 ` [PATCH 044/127] ASoC: use component probe/remove on ak4104 Kuninori Morimoto
2016-08-09  5:14 ` [PATCH 045/127] ASoC: use component probe/remove on adau1701 Kuninori Morimoto
2016-08-09  5:15 ` [PATCH 046/127] ASoC: use component probe/remove on ac97 Kuninori Morimoto
2016-08-09  5:15 ` [PATCH 047/127] ASoC: use component probe/remove on atmel-classd Kuninori Morimoto
2016-08-09  5:15 ` [PATCH 048/127] ASoC: use component probe/remove on atmel-pdmic Kuninori Morimoto
2016-08-09  5:16 ` [PATCH 049/127] ASoC: use component probe/remove on 88pm860x-codec Kuninori Morimoto
2016-08-09  5:16 ` [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec Kuninori Morimoto
2016-08-09  5:17 ` [PATCH 051/127] ASoC: use component probe/remove on ad1836 Kuninori Morimoto
2016-08-09  5:17 ` [PATCH 052/127] ASoC: use component probe/remove on ad193x Kuninori Morimoto
2016-08-09  5:17 ` [PATCH 053/127] ASoC: use component probe/remove on ad1980 Kuninori Morimoto
2016-08-09  5:18 ` [PATCH 054/127] ASoC: use component probe/remove on adau1373 Kuninori Morimoto
2016-08-09  5:18 ` [PATCH 055/127] ASoC: use component probe/remove on adau1761 Kuninori Morimoto
2016-08-09  5:19 ` [PATCH 056/127] ASoC: use component probe/remove on adau1781 Kuninori Morimoto
2016-08-09  5:19 ` [PATCH 057/127] ASoC: use component probe/remove on adau1977 Kuninori Morimoto
2016-08-09  5:19 ` [PATCH 058/127] ASoC: use component probe/remove on adav80x Kuninori Morimoto
2016-08-09  5:20 ` [PATCH 059/127] ASoC: use component probe/remove on alc5632 Kuninori Morimoto
2016-08-09  5:21 ` [PATCH 060/127] ASoC: use component probe/remove on cs47l24 Kuninori Morimoto
2016-08-09  5:21 ` [PATCH 061/127] ASoC: use component probe/remove on cx20442 Kuninori Morimoto
2016-08-09  5:21 ` [PATCH 062/127] ASoC: use component probe/remove on da7210 Kuninori Morimoto
2016-08-09  5:22 ` [PATCH 063/127] ASoC: use component probe/remove on da7213 Kuninori Morimoto
2016-08-09  5:22 ` [PATCH 064/127] ASoC: use component probe/remove on wm9713 Kuninori Morimoto
2016-08-09  5:22 ` [PATCH 065/127] ASoC: use component probe/remove on wm9712 Kuninori Morimoto
2016-08-09  5:23 ` [PATCH 066/127] ASoC: use component probe/remove on wm9705 Kuninori Morimoto
2016-08-09  5:23 ` [PATCH 067/127] ASoC: use component probe/remove on wm9090 Kuninori Morimoto
2016-08-09  5:23 ` [PATCH 068/127] ASoC: use component probe/remove on wm9081 Kuninori Morimoto
2016-08-09  5:24 ` [PATCH 069/127] ASoC: use component probe/remove on wm8998 Kuninori Morimoto
2016-08-09  5:24 ` [PATCH 070/127] ASoC: use component probe/remove on wm8997 Kuninori Morimoto
2016-08-09  5:25 ` [PATCH 071/127] ASoC: use component probe/remove on wm8996 Kuninori Morimoto
2016-08-09  5:25 ` [PATCH 072/127] ASoC: use component probe/remove on wm8995 Kuninori Morimoto
2016-08-09  5:25 ` [PATCH 073/127] ASoC: use component probe/remove on wm8994 Kuninori Morimoto
2016-08-09  5:26 ` [PATCH 074/127] ASoC: use component probe/remove on wm8993 Kuninori Morimoto
2016-08-09  5:26 ` [PATCH 075/127] ASoC: use component probe/remove on wm8990 Kuninori Morimoto
2016-08-09  5:27 ` [PATCH 076/127] ASoC: use component probe/remove on wm8988 Kuninori Morimoto
2016-08-09  5:27 ` [PATCH 077/127] ASoC: use component probe/remove on wm8983 Kuninori Morimoto
2016-08-09  5:27 ` [PATCH 078/127] ASoC: use component probe/remove on wm8971 Kuninori Morimoto
2016-08-09  5:28 ` [PATCH 079/127] ASoC: use component probe/remove on wm8961 Kuninori Morimoto
2016-08-09  5:28 ` [PATCH 080/127] ASoC: use component probe/remove on wm8955 Kuninori Morimoto
2016-08-09  5:28 ` [PATCH 081/127] ASoC: use component probe/remove on wm8940 Kuninori Morimoto
2016-08-09  5:29 ` [PATCH 082/127] ASoC: use component probe/remove on wm8904 Kuninori Morimoto
2016-08-09  5:29 ` [PATCH 083/127] ASoC: use component probe/remove on wm8900 Kuninori Morimoto
2016-08-09  5:29 ` [PATCH 084/127] ASoC: use component probe/remove on wm8400 Kuninori Morimoto
2016-08-09  5:30 ` [PATCH 085/127] ASoC: use component probe/remove on wm8350 Kuninori Morimoto
2016-08-09  5:30 ` [PATCH 086/127] ASoC: use component probe/remove on wm5110 Kuninori Morimoto
2016-08-09  5:30 ` [PATCH 088/127] ASoC: use component probe/remove on wm5100 Kuninori Morimoto
2016-08-09  5:31 ` [PATCH 089/127] ASoC: use component probe/remove on wm2200 Kuninori Morimoto
2016-08-09  5:31 ` [PATCH 090/127] ASoC: use component probe/remove on wm2000 Kuninori Morimoto
2016-08-09  5:32 ` [PATCH 091/127] ASoC: use component probe/remove on wm0010 Kuninori Morimoto
2016-08-09  5:32 ` [PATCH 092/127] ASoC: use component probe/remove on wl1273 Kuninori Morimoto
2016-08-09  5:32 ` [PATCH 093/127] ASoC: use component probe/remove on uda1380 Kuninori Morimoto
2016-08-09  5:33 ` [PATCH 094/127] ASoC: use component probe/remove on uda134x Kuninori Morimoto
2016-08-09  5:33 ` [PATCH 095/127] ASoC: use component probe/remove on twl6040 Kuninori Morimoto
2016-08-09  5:34 ` [PATCH 096/127] ASoC: use component probe/remove on twl4030 Kuninori Morimoto
2016-08-09  5:34 ` [PATCH 097/127] ASoC: use component probe/remove on tlv320dac33 Kuninori Morimoto
2016-08-09  5:34 ` [PATCH 098/127] ASoC: use component probe/remove on tlv320aic32x4 Kuninori Morimoto
2016-08-09  5:35 ` [PATCH 099/127] ASoC: use component probe/remove on tlv320aic26 Kuninori Morimoto
2016-08-09  5:35 ` [PATCH 100/127] ASoC: use component probe/remove on stac9766 Kuninori Morimoto
2016-08-09  5:36 ` [PATCH 101/127] ASoC: use component probe/remove on sn95031 Kuninori Morimoto
2016-08-09  5:36 ` [PATCH 102/127] ASoC: use component probe/remove on rt5677 Kuninori Morimoto
2016-08-09  5:36 ` [PATCH 103/127] ASoC: use component probe/remove on rt5670 Kuninori Morimoto
2016-08-09  5:37 ` [PATCH 104/127] ASoC: use component probe/remove on rt5659 Kuninori Morimoto
2016-08-09  5:38 ` [PATCH 105/127] ASoC: use component probe/remove on rt5651 Kuninori Morimoto
2016-08-09  5:38 ` [PATCH 106/127] ASoC: use component probe/remove on rt5645 Kuninori Morimoto
2016-08-09  5:38 ` [PATCH 107/127] ASoC: use component probe/remove on rt5640 Kuninori Morimoto
2016-08-09  5:39 ` [PATCH 108/127] ASoC: use component probe/remove on rt5514 Kuninori Morimoto
2016-08-09  5:39 ` [PATCH 109/127] ASoC: use component probe/remove on rt298 Kuninori Morimoto
2016-08-09  5:40 ` [PATCH 110/127] ASoC: use component probe/remove on rt286 Kuninori Morimoto
2016-08-09  5:40 ` [PATCH 111/127] ASoC: use component probe/remove on nau8825 Kuninori Morimoto
2016-08-09  5:40 ` [PATCH 112/127] ASoC: use component probe/remove on ml26124 Kuninori Morimoto
2016-08-09  5:41 ` [PATCH 113/127] ASoC: use component probe/remove on mc13783 Kuninori Morimoto
2016-08-09  5:41 ` [PATCH 114/127] ASoC: use component probe/remove on max98926 Kuninori Morimoto
2016-08-09  5:41 ` [PATCH 115/127] ASoC: use component probe/remove on max98925 Kuninori Morimoto
2016-08-09  5:42 ` [PATCH 116/127] ASoC: use component probe/remove on max9867 Kuninori Morimoto
2016-08-09  5:42 ` [PATCH 117/127] ASoC: use component probe/remove on max9850 Kuninori Morimoto
2016-08-09  5:42 ` [PATCH 118/127] ASoC: use component probe/remove on max98357a Kuninori Morimoto
2016-08-09  5:43 ` [PATCH 119/127] ASoC: use component probe/remove on max98095 Kuninori Morimoto
2016-08-09  5:43 ` [PATCH 120/127] ASoC: use component probe/remove on max98090 Kuninori Morimoto
2016-08-09  5:43 ` [PATCH 121/127] ASoC: use component probe/remove on max98088 Kuninori Morimoto
2016-08-09  5:44 ` [PATCH 122/127] ASoC: use component probe/remove on jz4740 Kuninori Morimoto
2016-08-09  5:44 ` [PATCH 123/127] ASoC: use component probe/remove on hdac_hdmi Kuninori Morimoto
2016-08-09  5:44 ` [PATCH 124/127] ASoC: use component probe/remove on da9055 Kuninori Morimoto
2016-08-09  5:45 ` [PATCH 125/127] ASoC: use component probe/remove on da7219 Kuninori Morimoto
2016-08-09  5:45 ` [PATCH 126/127] ASoC: use component probe/remove on da7218 Kuninori Morimoto
2016-08-09  5:46 ` [PATCH 127/127] ASoC: remove codec duplicated .probe/.remove Kuninori Morimoto
2016-08-09  7:52 ` [PATCH 000/127] ASoC: codec cleanup - codec probe/remove Lars-Peter Clausen
2016-08-09 11:26   ` Mark Brown
2016-08-10  0:31     ` Kuninori Morimoto
2016-08-10 11:17       ` Mark Brown
2016-08-11  1:03         ` Kuninori Morimoto
2016-08-11 17:07           ` Mark Brown
2016-08-11 17:44           ` Lars-Peter Clausen
2016-08-12  1:27             ` Kuninori Morimoto
2016-08-12  9:33               ` Lars-Peter Clausen
2016-08-12 10:22                 ` Mark Brown
2016-08-22  2:15                 ` 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.