]> git.baikalelectronics.ru Git - kernel.git/commit
clk: generalize devm_clk_get() a bit
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 20 May 2022 07:57:35 +0000 (09:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:34 +0000 (07:52 +0100)
commit6f86d7c168e1ff2a25341d047119b6a2d71b54d2
treedb8f9485803b63e9bd39dc59d5c6bb15a14eb9a0
parentd2ff6788bd61b1fbe93da7ddb33c5ce3653b7390
clk: generalize devm_clk_get() a bit

[ Upstream commit 111eac8fbc764cd030632bf508acec766bde4f75 ]

Allow to add an exit hook to devm managed clocks. Also use
clk_get_optional() in devm_clk_get_optional instead of open coding it.
The generalisation will be used in the next commit to add some more
devm_clk helpers.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <aardelean@deviqon.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220520075737.758761-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Stable-dep-of: 340cb392a038 ("memory: atmel-sdramc: Fix missing clk_disable_unprepare in atmel_ramc_probe()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-devres.c