[alsa-devel] [PATCH 0/3 v2] ASoC: remove duplicated definitions
Hi Mark
These are v2 of "ASoC: remove duplicated definitions" patches. These are based on mark/topic/core branch
Kuninori Morimoto (3): ASoC: remove duplicate definition of controls/num_controls ASoC: remove duplicate definition of dapm_widgets/num_dapm_widgets ASoC: remove duplicate definition of dapm_routes/num_dapm_routes
include/sound/soc.h | 6 ------ sound/soc/soc-core.c | 28 ++++++++++++---------------- 2 files changed, 12 insertions(+), 22 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
snd_soc_component and snd_soc_component_driver both have controls/num_controls, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- based on mark/topic/core
include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index df819f7..5d792e49 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_kcontrol_new *controls; - unsigned int num_controls; const struct snd_soc_dapm_widget *dapm_widgets; unsigned int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6fab0ff..8030da5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1555,9 +1555,10 @@ static int soc_probe_component(struct snd_soc_card *card, } }
- if (component->controls) - snd_soc_add_component_controls(component, component->controls, - component->num_controls); + if (component->driver->controls) + snd_soc_add_component_controls(component, + component->driver->controls, + component->driver->num_controls); if (component->dapm_routes) snd_soc_dapm_add_routes(dapm, component->dapm_routes, component->num_dapm_routes); @@ -3229,8 +3230,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->controls = driver->controls; - component->num_controls = driver->num_controls; component->dapm_widgets = driver->dapm_widgets; component->num_dapm_widgets = driver->num_dapm_widgets; component->dapm_routes = driver->dapm_routes;
The patch
ASoC: remove duplicate definition of controls/num_controls
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From b8972bf0521ca7ee3c8d27da0fd101fe648acfc2 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Date: Fri, 25 Aug 2017 00:29:01 +0000 Subject: [PATCH] ASoC: remove duplicate definition of controls/num_controls
snd_soc_component and snd_soc_component_driver both have controls/num_controls, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown broonie@kernel.org --- include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index de57a8ad057b..e4b4746032ba 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_kcontrol_new *controls; - unsigned int num_controls; const struct snd_soc_dapm_widget *dapm_widgets; unsigned int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3bb8c63564cf..1317706f8e69 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1495,9 +1495,10 @@ static int soc_probe_component(struct snd_soc_card *card, } }
- if (component->controls) - snd_soc_add_component_controls(component, component->controls, - component->num_controls); + if (component->driver->controls) + snd_soc_add_component_controls(component, + component->driver->controls, + component->driver->num_controls); if (component->dapm_routes) snd_soc_dapm_add_routes(dapm, component->dapm_routes, component->num_dapm_routes); @@ -3184,8 +3185,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->controls = driver->controls; - component->num_controls = driver->num_controls; component->dapm_widgets = driver->dapm_widgets; component->num_dapm_widgets = driver->num_dapm_widgets; component->dapm_routes = driver->dapm_routes;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
snd_soc_component and snd_soc_component_driver both have dapm_widgets/num_dapm_widgets, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- based on mark/topic/core
include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5d792e49..97dee73 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_soc_dapm_widget *dapm_widgets; - unsigned int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; unsigned int num_dapm_routes; struct snd_soc_codec *codec; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8030da5..00b71ee 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1511,9 +1511,10 @@ static int soc_probe_component(struct snd_soc_card *card,
soc_init_component_debugfs(component);
- if (component->dapm_widgets) { - ret = snd_soc_dapm_new_controls(dapm, component->dapm_widgets, - component->num_dapm_widgets); + if (component->driver->dapm_widgets) { + ret = snd_soc_dapm_new_controls(dapm, + component->driver->dapm_widgets, + component->driver->num_dapm_widgets);
if (ret != 0) { dev_err(component->dev, @@ -3230,8 +3231,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->dapm_widgets = driver->dapm_widgets; - component->num_dapm_widgets = driver->num_dapm_widgets; component->dapm_routes = driver->dapm_routes; component->num_dapm_routes = driver->num_dapm_routes;
The patch
ASoC: remove duplicate definition of dapm_widgets/num_dapm_widgets
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 688d0ebf49a97aa6959aebec5d177a8b821f27d1 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Date: Fri, 25 Aug 2017 00:29:20 +0000 Subject: [PATCH] ASoC: remove duplicate definition of dapm_widgets/num_dapm_widgets
snd_soc_component and snd_soc_component_driver both have dapm_widgets/num_dapm_widgets, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown broonie@kernel.org --- include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index e4b4746032ba..3e0070ed6883 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_soc_dapm_widget *dapm_widgets; - unsigned int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; unsigned int num_dapm_routes; struct snd_soc_codec *codec; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1317706f8e69..3a3236dc996d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1451,9 +1451,10 @@ static int soc_probe_component(struct snd_soc_card *card,
soc_init_component_debugfs(component);
- if (component->dapm_widgets) { - ret = snd_soc_dapm_new_controls(dapm, component->dapm_widgets, - component->num_dapm_widgets); + if (component->driver->dapm_widgets) { + ret = snd_soc_dapm_new_controls(dapm, + component->driver->dapm_widgets, + component->driver->num_dapm_widgets);
if (ret != 0) { dev_err(component->dev, @@ -3185,8 +3186,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->dapm_widgets = driver->dapm_widgets; - component->num_dapm_widgets = driver->num_dapm_widgets; component->dapm_routes = driver->dapm_routes; component->num_dapm_routes = driver->num_dapm_routes;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
snd_soc_component and snd_soc_component_driver both have dapm_routes/num_dapm_routes, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- based on mark/topic/core
include/sound/soc.h | 2 -- sound/soc/soc-core.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index 97dee73..bd9593347 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_soc_dapm_route *dapm_routes; - unsigned int num_dapm_routes; struct snd_soc_codec *codec;
int (*probe)(struct snd_soc_component *); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 00b71ee..03875ea 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1560,9 +1560,10 @@ static int soc_probe_component(struct snd_soc_card *card, snd_soc_add_component_controls(component, component->driver->controls, component->driver->num_controls); - if (component->dapm_routes) - snd_soc_dapm_add_routes(dapm, component->dapm_routes, - component->num_dapm_routes); + if (component->driver->dapm_routes) + snd_soc_dapm_add_routes(dapm, + component->driver->dapm_routes, + component->driver->num_dapm_routes);
list_add(&dapm->list, &card->dapm_list); list_add(&component->card_list, &card->component_dev_list); @@ -3231,9 +3232,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->dapm_routes = driver->dapm_routes; - component->num_dapm_routes = driver->num_dapm_routes; - INIT_LIST_HEAD(&component->dai_list); mutex_init(&component->io_mutex);
The patch
ASoC: remove duplicate definition of dapm_routes/num_dapm_routes
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 6969b2bae6dbe7f277a7c018b66d2f3ad662129f Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Date: Fri, 25 Aug 2017 00:29:41 +0000 Subject: [PATCH] ASoC: remove duplicate definition of dapm_routes/num_dapm_routes
snd_soc_component and snd_soc_component_driver both have dapm_routes/num_dapm_routes, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown broonie@kernel.org --- include/sound/soc.h | 2 -- sound/soc/soc-core.c | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index 3e0070ed6883..2bcb38045dc1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_soc_dapm_route *dapm_routes; - unsigned int num_dapm_routes; struct snd_soc_codec *codec;
int (*probe)(struct snd_soc_component *); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3a3236dc996d..b8f96a41b594 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1500,9 +1500,10 @@ static int soc_probe_component(struct snd_soc_card *card, snd_soc_add_component_controls(component, component->driver->controls, component->driver->num_controls); - if (component->dapm_routes) - snd_soc_dapm_add_routes(dapm, component->dapm_routes, - component->num_dapm_routes); + if (component->driver->dapm_routes) + snd_soc_dapm_add_routes(dapm, + component->driver->dapm_routes, + component->driver->num_dapm_routes);
list_add(&dapm->list, &card->dapm_list); list_add(&component->card_list, &card->component_dev_list); @@ -3186,9 +3187,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->dapm_routes = driver->dapm_routes; - component->num_dapm_routes = driver->num_dapm_routes; - INIT_LIST_HEAD(&component->dai_list); mutex_init(&component->io_mutex);
participants (2)
-
Kuninori Morimoto
-
Mark Brown