Skip to content

Commit

Permalink
ASoC: remove disable_route_checks
Browse files Browse the repository at this point in the history
No driver is using disable_route_checks, let's remove it.

Because snd_soc_dapm_add_routes() itself will indicate detail error
when failed, this patch removes duplicate dev_err() not only
dev_warn() in error case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Suggested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/87tta8268e.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
morimoto authored and broonie committed Jan 9, 2025
1 parent 61aff2d commit dd23951
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
1 change: 0 additions & 1 deletion include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,6 @@ struct snd_soc_card {
unsigned int instantiated:1;
unsigned int topology_shortname_created:1;
unsigned int fully_routed:1;
unsigned int disable_route_checks:1;
unsigned int probed:1;
unsigned int component_chaining:1;

Expand Down
29 changes: 4 additions & 25 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,19 +1644,8 @@ static int soc_probe_component(struct snd_soc_card *card,
ret = snd_soc_dapm_add_routes(dapm,
component->driver->dapm_routes,
component->driver->num_dapm_routes);
if (ret < 0) {
if (card->disable_route_checks) {
ret = 0;
dev_info(card->dev,
"%s: disable_route_checks set, ignoring errors on add_routes\n",
__func__);
} else {
dev_err(card->dev,
"%s: snd_soc_dapm_add_routes failed: %d\n",
__func__, ret);
goto err_probe;
}
}
if (ret < 0)
goto err_probe;

/* see for_each_card_components */
list_add(&component->card_list, &card->component_dev_list);
Expand Down Expand Up @@ -2235,18 +2224,8 @@ static int snd_soc_bind_card(struct snd_soc_card *card)

ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
card->num_dapm_routes);
if (ret < 0) {
if (card->disable_route_checks) {
dev_info(card->dev,
"%s: disable_route_checks set, ignoring errors on add_routes\n",
__func__);
} else {
dev_err(card->dev,
"%s: snd_soc_dapm_add_routes failed: %d\n",
__func__, ret);
goto probe_end;
}
}
if (ret < 0)
goto probe_end;

ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
card->num_of_dapm_routes);
Expand Down
12 changes: 2 additions & 10 deletions sound/soc/soc-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,16 +1101,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
}

ret = snd_soc_dapm_add_routes(dapm, route, 1);
if (ret) {
if (dapm->card->disable_route_checks) {
ret = 0;
dev_info(tplg->dev,
"ASoC: disable_route_checks set, ignoring dapm_add_routes errors\n");
} else {
dev_err(tplg->dev, "ASoC: dapm_add_routes failed: %d\n", ret);
break;
}
}
if (ret)
break;
}

return ret;
Expand Down

0 comments on commit dd23951

Please sign in to comment.