diff mbox series

[01/11] ASoC: simple-card-utils: remove both playback/capture_only check

Message ID 87a5kah6gm.wl-kuninori.morimoto.gx@renesas.com
State Accepted
Commit 45919c28134519080a85a5fb66d0f65955ef7572
Headers show
Series ASoC: simple-card: sync support | expand

Commit Message

Kuninori Morimoto May 28, 2024, 5:05 a.m. UTC
soc-pcm.c :: soc_get_playback_capture() will indicate error
if both playback_only / capture_only were true.

Thus, graph_util_parse_link_direction() which setup playback_only /
capture_only don't need to check it.
And, its return value is not used on existing driver. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/simple_card_utils.h     | 2 +-
 sound/soc/generic/simple-card-utils.c | 7 +------
 2 files changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index ad67957b7b48c..1a96e177158c8 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -195,7 +195,7 @@  int graph_util_is_ports0(struct device_node *port);
 int graph_util_parse_dai(struct device *dev, struct device_node *ep,
 			 struct snd_soc_dai_link_component *dlc, int *is_single_link);
 
-int graph_util_parse_link_direction(struct device_node *np,
+void graph_util_parse_link_direction(struct device_node *np,
 				    bool *is_playback_only, bool *is_capture_only);
 
 #ifdef DEBUG
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index b4876b4f259dd..17718c58793d2 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -1126,7 +1126,7 @@  int graph_util_parse_dai(struct device *dev, struct device_node *ep,
 }
 EXPORT_SYMBOL_GPL(graph_util_parse_dai);
 
-int graph_util_parse_link_direction(struct device_node *np,
+void graph_util_parse_link_direction(struct device_node *np,
 				    bool *playback_only, bool *capture_only)
 {
 	bool is_playback_only = false;
@@ -1135,13 +1135,8 @@  int graph_util_parse_link_direction(struct device_node *np,
 	is_playback_only = of_property_read_bool(np, "playback-only");
 	is_capture_only = of_property_read_bool(np, "capture-only");
 
-	if (is_playback_only && is_capture_only)
-		return -EINVAL;
-
 	*playback_only = is_playback_only;
 	*capture_only = is_capture_only;
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);