diff options
| author | bui duc phuc <phucduc.bui@gmail.com> | 2026-06-09 18:38:32 +0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-10 00:33:49 +0100 |
| commit | 5fb4660ce59b1093face3c3080123400ac10ddd3 (patch) | |
| tree | 844f32a19472cdcdbe67dad4f9a696577cc66ad1 /sound | |
| parent | cfa1466e6dfd185aed8d13b9a192657be51d87ec (diff) | |
| download | ath-5fb4660ce59b1093face3c3080123400ac10ddd3.tar.gz | |
ASoC: renesas: fsi: Use devm_clk_get_optional() for optional clocks
The xck, ick, and div clocks are optional. Switch from devm_clk_get()
to devm_clk_get_optional() to correctly handle cases where these clocks
are missing.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260609113836.45079-8-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/renesas/fsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c index 1df7dc0143630..e29be2bcf952c 100644 --- a/sound/soc/renesas/fsi.c +++ b/sound/soc/renesas/fsi.c @@ -994,7 +994,7 @@ static int fsi_clk_init(struct device *dev, /* external clock */ if (xck) { - clock->xck = devm_clk_get(dev, is_porta ? "xcka" : "xckb"); + clock->xck = devm_clk_get_optional(dev, is_porta ? "xcka" : "xckb"); if (IS_ERR(clock->xck)) { dev_err(dev, "can't get xck clock\n"); return -EINVAL; @@ -1007,7 +1007,7 @@ static int fsi_clk_init(struct device *dev, /* FSIACLK/FSIBCLK */ if (ick) { - clock->ick = devm_clk_get(dev, is_porta ? "icka" : "ickb"); + clock->ick = devm_clk_get_optional(dev, is_porta ? "icka" : "ickb"); if (IS_ERR(clock->ick)) { dev_err(dev, "can't get ick clock\n"); return -EINVAL; @@ -1020,7 +1020,7 @@ static int fsi_clk_init(struct device *dev, /* FSI-DIV */ if (div) { - clock->div = devm_clk_get(dev, is_porta ? "diva" : "divb"); + clock->div = devm_clk_get_optional(dev, is_porta ? "diva" : "divb"); if (IS_ERR(clock->div)) { dev_err(dev, "can't get div clock\n"); return -EINVAL; |
