Skip to content

Commit 9c0e29b

Browse files
committed
ASoC: remove disable_route_checks
Merge series from Kuninori Morimoto <[email protected]>: ASoC framwork has disable_route_checks flag. Intel is the last user of it, but it seems it exists in dead code. So we can remove it.
2 parents fd688ce + dd23951 commit 9c0e29b

File tree

4 files changed

+6
-38
lines changed

4 files changed

+6
-38
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/intel/boards/skl_hda_dsp_generic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
124124
return ret;
125125

126126
card->dev = &pdev->dev;
127-
if (!snd_soc_acpi_sof_parent(&pdev->dev))
128-
card->disable_route_checks = true;
129127

130128
if (mach->mach_params.dmic_num > 0) {
131129
card->components = devm_kasprintf(card->dev, GFP_KERNEL,

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)