]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: simple-card-utils: remove both playback/capture_only check
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 28 May 2024 05:05:14 +0000 (05:05 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 3 Jun 2024 14:59:33 +0000 (15:59 +0100)
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>
Link: https://msgid.link/r/87a5kah6gm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/simple_card_utils.h
sound/soc/generic/simple-card-utils.c

index 2c2279d082ec4b1ebf97d61e4c2ecb3319133fd0..0a6435ac5c5fe3331a50841d09d3d140b6eca079 100644 (file)
@@ -197,7 +197,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
index 852989611362d525e986c25de93762c72de11dcc..bc4d518c35cb4a03084ee62417aeec09beb058c8 100644 (file)
@@ -1140,7 +1140,7 @@ parse_dai_end:
 }
 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;
@@ -1149,13 +1149,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);