ASoC: rsnd: adg: use more simple method for null_clk
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Jun 2021 23:43:50 +0000 (08:43 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 12:56:40 +0000 (13:56 +0100)
commitcb2f97d89f383dafa822bce66f0c3514dfb135b8
tree774108822b3935f999cd026013a3c2b4a5972fa0
parentb48e4aa48931030382d26c624cf4ae1c68d15666
ASoC: rsnd: adg: use more simple method for null_clk

commit 965386c97616c ("ASoC: rsnd: call unregister for null_hw when
removed") tried unregister null_clk, but it has some issues.

1st issue is kernel will indicate below message when unregistering,
because of its timing. unregistering should be happen after clk_disable().

clk_unregister: unregistering prepared clock: rsnd_adg_null

2nd issue is, it is using priv->null_clk, but it should be adg->null_clk.

3rd issue is it is using very complex clk registering method.
more simple clk_register/unregister_fixed_rate() should be OK.

This patch fixes these.

Fixes: 965386c97616c ("ASoC: rsnd: call unregister for null_hw when removed")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1hli215.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/adg.c
sound/soc/sh/rcar/rsnd.h