mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
ASoC: fix usage of playback_only and capture_only
Shengjiu Wang <shengjiu.wang@nxp.com> says: Check value of is_playback_only and is_capture_only in graph_util_parse_link_direction() and initialize playback_only and capture_only in imx-card.c
This commit is contained in:
commit
5e4ed0320b
|
|
@ -710,6 +710,8 @@ static int imx_card_parse_of(struct imx_card_data *data)
|
|||
link->ops = &imx_aif_ops;
|
||||
}
|
||||
|
||||
playback_only = false;
|
||||
capture_only = false;
|
||||
graph_util_parse_link_direction(np, &playback_only, &capture_only);
|
||||
link->playback_only = playback_only;
|
||||
link->capture_only = capture_only;
|
||||
|
|
|
|||
|
|
@ -1183,9 +1183,9 @@ void graph_util_parse_link_direction(struct device_node *np,
|
|||
bool is_playback_only = of_property_read_bool(np, "playback-only");
|
||||
bool is_capture_only = of_property_read_bool(np, "capture-only");
|
||||
|
||||
if (np && playback_only)
|
||||
if (playback_only && is_playback_only)
|
||||
*playback_only = is_playback_only;
|
||||
if (np && capture_only)
|
||||
if (capture_only && is_capture_only)
|
||||
*capture_only = is_capture_only;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user