summaryrefslogtreecommitdiff
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-04-06 08:12:28 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-04-06 08:12:28 +0000
commitccf90e001d5d9c69bbb378a3aaea68bcc9f82a85 (patch)
tree583cecca96ea1e79f9edc57750a3c4b70d1d3225 /sound/soc/generic
parent6040081cd64b643878babf67a2ae9113f51cf189 (diff)
parentb90344f7d6000deba0709d75225f30cbf79ec2f0 (diff)
Merge tag 'v5.4.108' into 5.4-2.3.x-imx
This is the 5.4.108 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/simple-card-utils.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index edad6721251f..9b794775df53 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -172,15 +172,16 @@ int asoc_simple_parse_clk(struct device *dev,
* or device's module clock.
*/
clk = devm_get_clk_from_child(dev, node, NULL);
- if (IS_ERR(clk))
- clk = devm_get_clk_from_child(dev, dlc->of_node, NULL);
-
if (!IS_ERR(clk)) {
- simple_dai->clk = clk;
simple_dai->sysclk = clk_get_rate(clk);
- } else if (!of_property_read_u32(node, "system-clock-frequency",
- &val)) {
+
+ simple_dai->clk = clk;
+ } else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
simple_dai->sysclk = val;
+ } else {
+ clk = devm_get_clk_from_child(dev, dlc->of_node, NULL);
+ if (!IS_ERR(clk))
+ simple_dai->sysclk = clk_get_rate(clk);
}
if (of_property_read_bool(node, "system-clock-direction-out"))