mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
[ Upstream commiteaecce12f5] When unloading omap3-rom-rng, we'll get the following: WARNING: CPU: 0 PID: 100 at drivers/clk/clk.c:948 clk_core_disable This is because the clock may be already disabled by omap3_rom_rng_idle(). Let's fix the issue by checking for rng_idle on exit. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Adam Ford <aford173@gmail.com> Cc: Pali Rohár <pali.rohar@gmail.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Fixes:1c6b7c2108("hwrng: OMAP3 ROM Random Number Generator support") Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cb65ba75a5
commit
aa6eee8bd0
@@ -114,7 +114,8 @@ static int omap3_rom_rng_remove(struct platform_device *pdev)
|
||||
{
|
||||
cancel_delayed_work_sync(&idle_work);
|
||||
hwrng_unregister(&omap3_rom_rng_ops);
|
||||
clk_disable_unprepare(rng_clk);
|
||||
if (!rng_idle)
|
||||
clk_disable_unprepare(rng_clk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user