Skip to content

Commit dd23951

Browse files
morimotobroonie
authored andcommitted
ASoC: remove disable_route_checks
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 <[email protected]> Suggested-by: Amadeusz Sławiński <[email protected]> Tested-by: Amadeusz Sławiński <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 61aff2d commit dd23951

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

include/sound/soc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,6 @@ struct snd_soc_card {
11181118
unsigned int instantiated:1;
11191119
unsigned int topology_shortname_created:1;
11201120
unsigned int fully_routed:1;
1121-
unsigned int disable_route_checks:1;
11221121
unsigned int probed:1;
11231122
unsigned int component_chaining:1;
11241123

sound/soc/soc-core.c

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,19 +1644,8 @@ static int soc_probe_component(struct snd_soc_card *card,
16441644
ret = snd_soc_dapm_add_routes(dapm,
16451645
component->driver->dapm_routes,
16461646
component->driver->num_dapm_routes);
1647-
if (ret < 0) {
1648-
if (card->disable_route_checks) {
1649-
ret = 0;
1650-
dev_info(card->dev,
1651-
"%s: disable_route_checks set, ignoring errors on add_routes\n",
1652-
__func__);
1653-
} else {
1654-
dev_err(card->dev,
1655-
"%s: snd_soc_dapm_add_routes failed: %d\n",
1656-
__func__, ret);
1657-
goto err_probe;
1658-
}
1659-
}
1647+
if (ret < 0)
1648+
goto err_probe;
16601649

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

22362225
ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
22372226
card->num_dapm_routes);
2238-
if (ret < 0) {
2239-
if (card->disable_route_checks) {
2240-
dev_info(card->dev,
2241-
"%s: disable_route_checks set, ignoring errors on add_routes\n",
2242-
__func__);
2243-
} else {
2244-
dev_err(card->dev,
2245-
"%s: snd_soc_dapm_add_routes failed: %d\n",
2246-
__func__, ret);
2247-
goto probe_end;
2248-
}
2249-
}
2227+
if (ret < 0)
2228+
goto probe_end;
22502229

22512230
ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
22522231
card->num_of_dapm_routes);

sound/soc/soc-topology.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,16 +1101,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
11011101
}
11021102

11031103
ret = snd_soc_dapm_add_routes(dapm, route, 1);
1104-
if (ret) {
1105-
if (dapm->card->disable_route_checks) {
1106-
ret = 0;
1107-
dev_info(tplg->dev,
1108-
"ASoC: disable_route_checks set, ignoring dapm_add_routes errors\n");
1109-
} else {
1110-
dev_err(tplg->dev, "ASoC: dapm_add_routes failed: %d\n", ret);
1111-
break;
1112-
}
1113-
}
1104+
if (ret)
1105+
break;
11141106
}
11151107

11161108
return ret;

0 commit comments

Comments
 (0)