summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic/audio-graph-card2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/generic/audio-graph-card2.c')
-rw-r--r--sound/soc/generic/audio-graph-card2.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 56f7f946882e..4ad3d1b0714f 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -966,8 +966,6 @@ int audio_graph2_link_dpcm(struct simple_util_priv *priv,
graph_parse_convert(ep, dai_props); /* at node of <dpcm> */
graph_parse_convert(rep, dai_props); /* at node of <CPU/Codec> */
- snd_soc_dai_link_set_capabilities(dai_link);
-
graph_link_init(priv, lnk, cpu_port, codec_port, li, is_cpu);
err:
of_node_put(ep);
@@ -1141,21 +1139,12 @@ static int graph_counter(struct device_node *lnk)
*/
if (graph_lnk_is_multi(lnk)) {
struct device_node *ports = port_to_ports(lnk);
- struct device_node *port = NULL;
- int cnt = 0;
/*
* CPU/Codec = N:M case has many endpoints.
* We can't use of_graph_get_endpoint_count() here
*/
- while(1) {
- port = of_get_next_child(ports, port);
- if (!port)
- break;
- cnt++;
- }
-
- return cnt - 1;
+ return of_get_child_count(ports) - 1;
}
/*
* Single CPU / Codec
@@ -1449,7 +1438,7 @@ static struct platform_driver graph_card = {
.of_match_table = graph_of_match,
},
.probe = graph_probe,
- .remove_new = simple_util_remove,
+ .remove = simple_util_remove,
};
module_platform_driver(graph_card);